How Search Results are Generated
The order of search results is determined by the calculated relevancy score. The more relevant the item is to the term, it will show up first.
We calculate the relevancy score by term frequency, inverse frequency, and field length.
- Term Frequency refers to how often the term appears in the field.
- Inverse frequency is how often does each term appear in the index. The more often the term appears the less relevant.
- Field Length - The longer the field the less likely it is that the words in the field will be relevant.
For example, if the word "shirt" is searched we search each field in the settings. If we search the name field and we find "shirt," we give that more relevancy weight than say the caption field. Because the caption property has more data in it than the name field and because the term "shirt" appears less.
Suggested results are determined based on the above, but we also prefix the missing text to find any related items. For example, if a customer searches "blue t," we will search for the word "blue" and then we would find the first 50 terms that begin with "t" and add these terms to be searched.