-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
No mechanism for injecting supplementary, dynamic filters to each query #193
Comments
@zopyx I just remembered this feature I added a while ago. Could you try using the Here's a detailed thread on this topic: #17 |
Yes, but this only seems to work as long the facets remain unchanged. This is what was mentioned in the discussion on Slack. As soon facets filters are in the game, this configuration seems to be ignored. |
Scratch the Configure widget suggestion. Could you try this instead of static filters: #17 (comment) |
I tried that here: https://gist.github.com/zopyx/9897d692571caccba60e49480fc36461#file-gistfile1-txt-L182-L184 But I don't see that this additional filter is being used. |
That still uses the Configure widget. Could you use the helper approach like this instead: #17 (comment) Specifically this part: searchFunction(helper) {
helper.addFacetRefinement('language', 'de').search();
}, |
Feature request:
It is a common use case to add dynamic filters or subqueries in Typesense. For example, in our content management system, we want to limit the search to
area=Sales
when the user is in the sales folder of the portal. This filter should be applied in all cases for all facets.Scoped API keys are not a suitable solution as the associated query is always static, and it is not feasible to have a scoped API key for every possible subquery.
The current workaround is to use
toggleRefinement
for the related field (area
in this example) of a subquery with the settingoff: Sales
. This works for multiple fields, but it only works for simplefield=value
filters.It would be a very useful addition if we could specify an arbitrary subquery as part of the InstantSearchAdapter configuration (for example, through
additionalSearchParameters
).I understand that this feature request may fall under the scope of Algolia. Is this correct?
Complete discussion: https://typesense-community.slack.com/archives/C01P749MET0/p1705584152093769
The text was updated successfully, but these errors were encountered: