-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[v2] allow defining additional filters for algolia when using contextualSearch #3790
Comments
Yes, I meant the
This currently fails with:
caused by this diff. However, it would be nice to add additional filters to the default docusaurus filters - for example to browse specific projects or to just search in FAQ etc! So I guess my reply to
would be yes, exactly! |
I added this security because I didn't want users to forget to remove their facetFilter when enabling contextual search, otherwise it would likely mess-up with contextual search. We'd rather think about a more explicit API to enrich the contextual filters with new ones, instead of removing this security. |
Sure that works for me also! Could also be a function:
|
We can't allow such callback in node config because this callback has to be applied on client-side (after we compute appropriate contextual facet filters from current browser URL). I couldn't find any good API for these additional filters, and I think it's safe to just remove the security: the user will notice if search doesn't return anything, and this is documented. Fixed in #3804 |
Cool thanks! |
🚀 Feature
#3550 introduces
algolia.contextualSearch
which is great as it simplifies indexing of versions and languages. However, it removes the ability to define other filters.It would be great if we could allow both side-by-side and only throw warnings when language or version is overwritten.
Have you read the Contributing Guidelines on issues?
yes
Motivation
We have several projects that use the same algolia index/apiKey and want the search to return information relevant to the project being looked at, not every project.
The text was updated successfully, but these errors were encountered: