This is an automated email from the ASF dual-hosted git repository. tballison pushed a commit to branch TIKA-4743-search-results in repository https://gitbox.apache.org/repos/asf/tika.git
commit 0678aae812833cfab5903eb066df20e771d8b814 Author: tallison <[email protected]> AuthorDate: Mon Jun 1 08:47:08 2026 -0400 TIKA-4743 -- fix search result links --- docs/publish-docs.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/publish-docs.sh b/docs/publish-docs.sh index e7e353506c..984e20a6ee 100755 --- a/docs/publish-docs.sh +++ b/docs/publish-docs.sh @@ -83,6 +83,11 @@ cp target/site/404.html "${DOCS_DIR}/" # Lunr index lives next to _/ (one level above docs/), since HTML uses ../../search-index.js. # Remove the stale copy from its old publish/docs/ location left by earlier runs. rm -f "${DOCS_DIR}/search-index.js" -cp target/site/search-index.js "${PUBLISH_DIR}/" +# Rewrite URLs in the search index from /tika/X.Y.Z/... (Antora's component- +# prefixed publish path) to /docs/X.Y.Z/... (the deployed layout). The HTML +# pages and sitemap.xml above are similarly flattened; without this rewrite, +# clicking a search result lands on https://tika.apache.org/tika/... which +# 404s. See TIKA-4743. +sed 's|"url":"/tika/|"url":"/docs/|g' target/site/search-index.js > "${PUBLISH_DIR}/search-index.js" echo "Published to: ${DOCS_DIR}/"
