You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2023/07/12 13:32:59 UTC
[solr] branch main updated: SOLR-16884: Enable javadocs search for the site build (#1772)
This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 5b801cb27b5 SOLR-16884: Enable javadocs search for the site build (#1772)
5b801cb27b5 is described below
commit 5b801cb27b5e417211d765d6788984f01d6062b0
Author: Houston Putman <ho...@apache.org>
AuthorDate: Wed Jul 12 09:32:53 2023 -0400
SOLR-16884: Enable javadocs search for the site build (#1772)
---
dev-tools/scripts/checkJavadocLinks.py | 4 ++--
gradle/documentation/render-javadoc.gradle | 9 ++++++++-
solr/CHANGES.txt | 2 ++
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dev-tools/scripts/checkJavadocLinks.py b/dev-tools/scripts/checkJavadocLinks.py
index 768a74195e4..56dffc8ac41 100644
--- a/dev-tools/scripts/checkJavadocLinks.py
+++ b/dev-tools/scripts/checkJavadocLinks.py
@@ -41,7 +41,7 @@ class FindHyperlinks(HTMLParser):
def handle_starttag(self, tag, attrs):
# NOTE: I don't think 'a' should be in here. But try debugging
# NumericRangeQuery.html. (Could be javadocs bug, it's a generic type...)
- if tag not in ('link', 'meta', 'frame', 'br', 'wbr', 'hr', 'p', 'li', 'img', 'col', 'a', 'dt', 'dd'):
+ if tag not in ('link', 'meta', 'frame', 'br', 'wbr', 'hr', 'p', 'li', 'img', 'col', 'a', 'dt', 'dd', 'input'):
self.stack.append(tag)
if tag == 'a':
id = None
@@ -79,7 +79,7 @@ class FindHyperlinks(HTMLParser):
raise RuntimeError('couldn\'t find an href nor name in link in %s: only got these attrs: %s' % (self.baseURL, attrs))
def handle_endtag(self, tag):
- if tag in ('link', 'meta', 'frame', 'br', 'hr', 'p', 'li', 'img', 'col', 'a', 'dt', 'dd'):
+ if tag in ('link', 'meta', 'frame', 'br', 'hr', 'p', 'li', 'img', 'col', 'a', 'dt', 'dd', 'input'):
return
if len(self.stack) == 0:
diff --git a/gradle/documentation/render-javadoc.gradle b/gradle/documentation/render-javadoc.gradle
index 29e43f913ce..bd720b61615 100644
--- a/gradle/documentation/render-javadoc.gradle
+++ b/gradle/documentation/render-javadoc.gradle
@@ -68,6 +68,8 @@ allprojects {
relativeProjectLinks = true
+ enableSearch = true
+
// Place the documentation under Lucene or Solr's documentation directory.
// docroot is defined in 'documentation.gradle'
outputDir = project.docroot.toPath().resolve(project.relativeDocPath).toFile()
@@ -218,6 +220,9 @@ class RenderJavadocTask extends DefaultTask {
@Input
boolean linksource = false
+ @Input
+ boolean enableSearch = false
+
@Input
boolean relativeProjectLinks = false
@@ -286,7 +291,9 @@ class RenderJavadocTask extends DefaultTask {
opts << [ '-encoding', 'UTF-8' ]
opts << [ '-charset', 'UTF-8' ]
opts << [ '-docencoding', 'UTF-8' ]
- opts << '-noindex'
+ if (!enableSearch) {
+ opts << '-noindex'
+ }
opts << '-author'
opts << '-version'
if (linksource) {
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4efad9340b1..7e0562afedf 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -122,6 +122,8 @@ New Features
* SOLR-16675: Added function queries for dense vector similarity. (Elia Porciani, Alessandro Benedetti)
+* SOLR-16884: Solr Javadocs now have searching enabled. (Mike Drob, Houston Putman)
+
Improvements
---------------------