Prefix search enables users to find relevant results to partial queries giving the users a live and interactive search experience. For instance, results relevant to “credit card” are returned when the user types in “c”, “cr” or “cre”. As additional letters or words are inputted, the search results become more refined.
To configure Prefix search in SearchAssist, go to the Search Settings under the Indices tab and click on Prefix Search.
Use the toggle button to enable or disable the prefix search feature.
When the feature is enabled, use the following fields to fine-tune the results to be returned with prefix search.
Prefix Search Type
This field is used to specify whether one or more words from the query should be used for prefix search. Select one of the following prefix search types.
Prefix Any: When you choose this option, all the words in the query are treated as prefixes, and results are returned when any of the prefixes match the indexed data.
Prefix All: When you choose this option, one or more words entered are treated as a prefix and results are returned only when all the words match the data.
To understand the difference, let us assume that there are two data records:
1: “Check out these fighter jets flying over my town!”
2: “The air show featured a variety of fighter jets, including the F-16 and the F-35.”
And the search query is “fly fighter je”.
If the prefix search type is set to ‘Prefix All’, the search result would return only the first record since it has all the words in the prefix, irrespective of the order of the words.
However, if the prefix type is set to ‘Prefix Any’, the search result would return both the records since both the records contain at least one of the words from the search query.
Fields for Prefix Search
Select the fields to be used for the Prefix search in the search results. These are the fields against which the prefixes will be matched to find relevant results. To select a field for prefix search, click the Add field button and select the field from the list of searchable fields.