Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16884: Enable javadocs search for the site build (#1772)

Houston Putman5b801cb27b5e
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
---------------------