Skip to content

Ref guide - Improve docs for Dense Vector reranking examples#4532

Open
adamjq wants to merge 1 commit into
apache:mainfrom
adamjq:docs/improve-vector-rerank-documentation
Open

Ref guide - Improve docs for Dense Vector reranking examples#4532
adamjq wants to merge 1 commit into
apache:mainfrom
adamjq:docs/improve-vector-rerank-documentation

Conversation

@adamjq

@adamjq adamjq commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

The Dense Vector Search page in the Solr Ref Guide currently has a section titled Usage in Re-Ranking Query. However, it only contains a single example of re-ranking with the KNN query parser which has an important caveat that this initiates a second pass full KNN query. While this is true, I think it may be confusing to readers as it's not the only supported option for re-ranking documents with vectors.

This PR adds documentation for the more efficient re-ranking feature that rerank subsets of documents by direct vector comparisons with the vectorSimilarity Function, with some notes about motivations and tradeoffs.

Solution

  • Moves indentation level of Usage in Re-Ranking Query in Dense Vector Search ref guide
  • Adds examples of how to use {!func}vectorSimilarity in a re-rank query
  • Adds note about reranking with Dense Vector Fields in Query Re-Ranking page

Before

solr_dense_vector_ref_guide_before

After

solr_dense_vector_ref_guide_changes

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 16, 2026
@adamjq adamjq marked this pull request as ready for review June 17, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant