FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: add rerank_hybrid_matches to SearchParameters by alangmartini · Pull Request #100 · typesense/typesense-java · GitHub

fix: add rerank_hybrid_matches to SearchParameters - #100

Open
alangmartini wants to merge 2 commits into
typesense:masterfrom
alangmartini:fix/add-rerank-hybrid-matches-to-search-params
Open

fix: add rerank_hybrid_matches to SearchParameters#100
alangmartini wants to merge 2 commits into
typesense:masterfrom
alangmartini:fix/add-rerank-hybrid-matches-to-search-params

Conversation

alangmartini commented Feb 9, 2026
edited
Loading

Copy link
Copy Markdown

Summary

  • Bug: rerank_hybrid_matches was only available on MultiSearchCollectionParameters, forcing users to use multi_search even for single-collection hybrid search. The Typesense server accepts this parameter on all search endpoints.
  • Fix: Added a spec patch in DownloadSpecsPlugin.groovy that injects the rerank_hybrid_matches boolean property into the SearchParameters schema in the downloaded OpenAPI spec, following the same approach as the existing SynonymItemSchema patch.
  • Tests: Added unit tests verifying that SearchParameters exposes rerankHybridMatches with the correct default (false) and serializes to the expected JSON key rerank_hybrid_matches.

The rerank_hybrid_matches field was only defined on
MultiSearchCollectionParameters in the OpenAPI spec, forcing users to
use multi_search even for single collection hybrid search. The Typesense
server accepts this parameter for all search endpoints.

Add a spec patch in DownloadSpecsPlugin that injects the
rerank_hybrid_matches boolean property into SearchParameters, matching
the existing SynonymItemSchema patching approach.
Verify that SearchParameters exposes rerankHybridMatches with the
correct default value (false) and serializes to the expected JSON key
rerank_hybrid_matches for Typesense server compatibility.
} else {
println('Warning: SynonymItemSchema allOf block not found, skipping patch')
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is monkey patching the actual contents of the API spec, and isn't used anywhere else. I'd avoid this and instead merge typesense/typesense-api-spec#112 first, since it's going to add it regardless.

Copy link
Copy Markdown
Author

Since the correct path is fixing the api specs in https://github.com/typesense/typesense-api-spec, im closing this.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL