Closed reinoldus closed 3 years ago
Hi there,
Same problem with instantsearch.js. I need to fetch data in two indexes (category and product).
The Brand facet is configured for Product Index but it's irrelevant for Category Index.
With Algolia, we can use index widget => https://www.algolia.com/doc/api-reference/widgets/index-widget/js/ We build a kind of nested widget. It works like a charm (take a look to the screen), but with type sense i'm facing an issue...
My console returns this error :
Error: 404 - Could not find a facet field named
brandin the schema.
Expected Behavior (with Algolia)
@reinoldus @streetcolor Thank you for bringing this up. I just added support for collection/index-specific settings in a pre-release version of the adapter: v1.2.0-0
Here are instructions on how to use it: https://github.com/typesense/typesense-instantsearch-adapter/tree/v1.2.0-0#index
Could you give it a shot and let me know if you run into any issues?
Hi Jasonbosco,
Unfortunately, your patch doesn't fix issue. I need to replace facet_by which is sent in the request.
Best regards,
@streetcolor facet_by
is controlled by the InstantSearch library (not the adapter), when you use any of the filter widgets like RefinementList, RangeSlider, etc. So facet_by can't be overridden manually in the adapter using additionalSearchParameters - InstantSearch will just ignore it and use what you've configured in the widgets.
So you'd have to use the index widget and scope other filter widgets within it, and then InstantSearch will take care of setting facet_by automatically for you, based on the widget's attribute field.
Could you share a minimal code snippet that shows how you've configured the widgets?
Description
I would like to implement a multi index search using the following component from instantsearch: https://www.algolia.com/doc/api-reference/widgets/index-widget/vue/
The issue is: It only works if both indexes share the same attribute you want to query on, if you want to query e.g. name in index A and body in index B then you'd have to instantiate two search clients which would also result in two requests to the server.
It would be great if we could use to overwrite queryBy or add something like this to additonalSearchParameters:
Steps to reproduce
The following snippet should help to build a sample app
Expected Behavior
I can set the queryBy-parameter for each index separately
Actual Behavior
Querying only works if both indexes share the attribute e.g: "name"