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

Add function to resetAutocompleteCache #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jash
Copy link

@jash 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. In the same way, when filters/facets are changed when using this code, Swiftype.resetAutocompleteCache() should be called to reset the cache and provide consistent autocomplete results.

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

Successfully merging this pull request may close these issues.

1 participant