Why does autocomplete return fewer/different results than the full search page?


#1

When I do a full search by pressing Enter in the search box, I get multiple pages of results. Why are there fewer autocomplete results when performing the same search?

Autocomplete results and full-text search results can differ because they prioritize different sets of indexed fields to return those results. Our autocomplete library is designed to be very quick, and is optimized to look primarily at fields with a data type of string (such as the default title and sections fields). Whereas full-text searches will process searches against all the fields you’ve configured in the Weights page of your Swiftype dashboard or within the search_fields option of a custom search request.

In our API documentation, you can find a chart (field type use cases) that reviews document field types and how they impact your engine’s autocomplete and search functionality.

If you are building a custom implementation using one of our client libraries, or API, you can configure your autocomplete to use our search endpoint instead. This will provide parity of results in either the autocomplete or full-text search contexts.

A point of consideration is that in doing so your analytics reporting will no longer be able to distinguish searches being submitted from searches triggered by the autocomplete feature.