-
Notifications
You must be signed in to change notification settings - Fork 369
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
Toogle index in search provider #584
Comments
Hi @artcups, My recommendation would be to put Products and Content into the same index / engine, and simply tag them with a Alternatively, you use an App Search Meta Engine to make both engines searchable from the same query: https://www.elastic.co/guide/en/app-search/current/meta-engines-guide.html The connector is cached by the SearchProvider so you won't be able to simply pass a new connector. You could try forcing the Do something like:
|
Please let me know how you decide to proceed out how it works out. |
We went with an index/metaindex with documents containing content_type with an beforeSearch method setting the fieldset depending on what type is choosen. My problem now is that all the filter is added to the url. Is it possible to state what filters shoud be hidden in the address. The initial filter set in the config is only used on the first search. Would be a great feature to add to the library since I dont think its an uncommon thing to do? |
That would be a great feature, we've talked about that before. I can't totally grasp what you're describing as your solution, but I will say that if you configure a "global filter" like described here, it won't show up in the URL... but it WILL be applied to every query, not sure if that's what you want or not: https://github.com/elastic/search-ui/blob/master/ADVANCED.md#global-filters |
Keeping this open as a feature request to be able to dynamically update the index being used in search. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Can confirm we hit this issue |
Hey @cpebble |
Yeah; the Key prop works. I just wanted to check up on whether you think this is worth fixing :) |
We are building an search experiance for an eccomerce platform. We have a few different content types (different document types) indexed in a few diffrent indicies.
We have tried a few different approaches without any luck to change the current index being used by the search provider but nothing seems to be working, it keep sending the search request to the first index that it was initialized with.
Switching between two diffent indices
![image](https://user-images.githubusercontent.com/2920344/131265559-dec9ac9d-aefd-4da1-aa2d-b536ad36fd96.png)
Last attemt was to create a whole new
AppSearchAPIConnector
with newsearchKey
andengineName
in but that didn’t work either.Any ideas on how to toggle the index and make a new search at the same time
@elastic/search-ui: 1.5.1
@elastic/search-ui-app-search-connector: 1.5.1
Working example would be great.
Thank you for a good product!
The text was updated successfully, but these errors were encountered: