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

Adding filter / facet support #48

Open
jash opened this issue Aug 24, 2020 · 0 comments
Open

Adding filter / facet support #48

jash opened this issue Aug 24, 2020 · 0 comments
Assignees

Comments

@jash
Copy link

jash commented Aug 24, 2020

This library is very flexible, but appears to be missing the option to handle filters/facets. If someone has partially entered a search term (and autocomplete results are showing), and then filters/facets are added or changed, the autocomplete results display inconsistently and erratically. That is because some entries are cached prior to the filter/facet, but new requests are filtered.

The jquery.swiftype.js library has a function Swiftype.reloadResults() which should be called whenever a filter/facet is dynamically changed. However, there appears to be no corresponding function for this library.

I submitted a pull request that adds a function you can call Swiftype.resetAutocompleteCache() when filters/facets are changed. This will update the autocomplete search results with the new filtered entries, and reset the cache.

#47

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

5 participants