New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with filter_by parameters when using facets #196
Comments
I have fixed this issue and prepare pull request. Please test and merge if that is ok so in next release it's included. |
Thank you for the PR, it's an interesting way to solve this. But, there is actually already a way to setup fixed filter from within Instantsearch: #17 (comment) |
Hi, thank you for your answer If I understand correctly than filter_by is meant to be removed even if it's specified in initial search paramters? example you provided is about adding a facet helpr, while I have an issue with filter_by property being removed (not for facet but score, which is just a field) I will try to find if using searchFunction can help for that and what are the function but I see searchFunction is depreceted and onStateChange should be used. if you can help me understand how to retaing filter_by without changing the code of the library it woudl be great |
That's correct. This is how the InstantSearch library works when used without Typesense. You'd typically use the
It's a facet refinement, which is how Instantsearch calls filtering.
I'm not familiar with this deprecation, but if you look at Instantsearch / Algolia forums on how to setup a fixed a fixed filter, you should find the latest way to do this from within Instantsearch. |
Thank you! |
Description
If you set filterBy in the search configuration and use facet filtering with RefinementList, the facet filter overwrites (ignores) filterBy configuration which results in more results
Steps to reproduce
For example if I filter all results by default from config with filterBy
additionalSearchParameters: {
queryBy: "embeddings,title",
vectorQuery:
embeddings:([], distance_threshold:0.1)
,perPage: 10,
filterBy: "score:>6",
},
and than use facets with
Than request made to server will contain filterBy score, but if I click one of the refinement options facets, than filterBy score is ignore and overwritten by facet filterBy option.
Expected Behavior
Filtering by facet should not ignore and overwrite configured filterBy parameter.
Actual Behavior
Filtering by facet overwrites filter_by parameter in request and only uses facets filter
Metadata
Typesense 0.25.2
Mac OSX
The text was updated successfully, but these errors were encountered: