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:36:47 UTC

[solr] branch branch_9x 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 branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 80f438ade9d SOLR-16884: Enable javadocs search for the site build (#1772)
80f438ade9d is described below

commit 80f438ade9d848ee4b0df0ef1e616bccc8e3d181
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)
    
    (cherry picked from commit 5b801cb27b5e417211d765d6788984f01d6062b0)
---
 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 6253aafbb2b..b89b8879e90 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()
@@ -229,6 +231,9 @@ class RenderJavadocTask extends DefaultTask {
   @Input
   boolean linksource = false
 
+  @Input
+  boolean enableSearch = false
+
   @Input
   boolean relativeProjectLinks = false
 
@@ -297,7 +302,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 7162cc9b03a..309cebdfda0 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -73,6 +73,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
 ---------------------