-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
How to setup federated search with facets? #5
Comments
Hi @enzotar, This is a react-instantsearch issue. Try putting the Facet under the same <Index indexName='flows'>
<FlowFacets />
<Hits hitComponent={FlowHit} />
</Index> If you are worried about the layout, consider using css Does this help? |
I know that works. But I have 4 indices that I'm searching across. The grid would help if there was only one index. |
I am afraid it isn't possible to place them in separate Index components. If your problem is styling then you would have to rethink your layout. Again, I recommend digging into css grid, you will find a solution there. |
@phiHero How can merge these queries? |
@jasonbosco Can you guys make an example using multiple indices and facets. Is there a chance the issue is not InstantSearch related? |
Hi @enzotar,
Unfortunately no, the queries are generated by the Instantsearch widgets.
This could be because of the There is a workaround if you want to display the hits in a different place. Use custom widgets inside the same
This is InstantSearch related. I tested using Algolia and this 'issue' still remain. |
Issue
Facets do not update the hit results when placed in a separate Index component, even with the same indexId.
Description
We currently have the search working without federated, using InstantSearch v6, and using routing params to reload the query.
See https://spaceoperator.com/marketplace
After adding federated,
collectionSpecificSearchParameters
and updating to v7 for instantSearch, the facets no longer work.See https://flow-a95tf0hb0-space-operator.vercel.app/marketplace
Below is the setup. Search works well. And the search also filters the facets.
However interaction with the facets does not update the hit results.
The indexId on the facets and hits match.
Added VirtualWidget per Algolia's instructions to the index with the hits, but once added the facet filters on the first interaction only. Facets remains checked and facets no longer. uiState object does not get updated either. I have commented the VirtualWidgets.
Replicate
Visit https://flow-a95tf0hb0-space-operator.vercel.app/marketplace
Open console, watch uiState object
Type 'wormhole' in search, results and facets get correctly updated.
Then select a facet 'Solana,' uiState gets updated but not the hits results.
Code
The text was updated successfully, but these errors were encountered: