Skip to content
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

Supporting wildcard facets like in Algolia #129

Closed
shasha79 opened this issue Oct 21, 2022 · 6 comments
Closed

Supporting wildcard facets like in Algolia #129

shasha79 opened this issue Oct 21, 2022 · 6 comments

Comments

@shasha79
Copy link

shasha79 commented Oct 21, 2022

Description

I am trying to migrate InstantSearch-based site from Algolia to Typesense and facing the issue. Algolia supports getting all available facets by using a wildcard: facets:['*'] (https://www.algolia.com/doc/api-reference/api-parameters/facets/). Typense returns error in this case:
Could not find a facet field named * in the schema.
Any idea how to work around it?

Steps to reproduce

Expected Behavior

Actual Behavior

Metadata

Typsense Version:

OS:

@jasonbosco
Copy link
Member

jasonbosco commented Oct 21, 2022

@shasha79 Typesense doesn't yet support facet_by: *, so each facet field should be explicitly listed in the query. See typesense/typesense#612.

On a side note, may I know which instantsearch widget this is for?

@shasha79
Copy link
Author

I am migrating the whole Algolia template, there are many widgets there
https://github.com/algolia/pwa-ecom-ui-template

@zergormagn
Copy link

Dynamicwidgets with facets:[] also fails. I tried switching the search client between a compiled Algolia version using dynamicwidgets with facets:[] to a TS server, I actually got the TS instantsearch adapter requesting unlisted facets from the TS server.
I'm guessing the Instantsearch client must have cached some initial facet request and once it was directed at the TS adapter it still worked for the TS server. I don't know if dynamicwidgets could render, because one of the fields in Algolia sample data was not on the TS server so the adapter tripped over it.

@jasonbosco
Copy link
Member

Related to #106

@pixelkoduje
Copy link

I see that instead of the "*" error, it shows the error 'Field name is not marked as a guy in the schema.'
I using const data = useDynamicWidgets({ guys: ['*'] }) in docker version 0.25.0.rc9
It's not finished, do I need to do something else to make it work?
I'm using react-instantsearch-hooks-web

@jasonbosco
Copy link
Member

This is now supported: #150 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants