Skip to content

Adding filter / facet support #48

@jash

Description

@jash

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions