fix: add rerank_hybrid_matches to SearchParameters#100
Open
alangmartini wants to merge 2 commits intotypesense:masterfrom
Open
fix: add rerank_hybrid_matches to SearchParameters#100alangmartini wants to merge 2 commits intotypesense:masterfrom
alangmartini wants to merge 2 commits intotypesense:masterfrom
Conversation
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.
tharropoulos
suggested changes
Feb 10, 2026
| } else { | ||
| println('Warning: SynonymItemSchema allOf block not found, skipping patch') | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
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.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rerank_hybrid_matcheswas only available onMultiSearchCollectionParameters, forcing users to usemulti_searcheven for single-collection hybrid search. The Typesense server accepts this parameter on all search endpoints.DownloadSpecsPlugin.groovythat injects thererank_hybrid_matchesboolean property into theSearchParametersschema in the downloaded OpenAPI spec, following the same approach as the existingSynonymItemSchemapatch.SearchParametersexposesrerankHybridMatcheswith the correct default (false) and serializes to the expected JSON keyrerank_hybrid_matches.