Minimum match and phrase slop
Influence search relevancy by using minimum match and phrase slop.
Minimum match
Specifies the number of search keywords that are required to match the indexed document, when the
ANY
search type is used. A number denotes the number of query keywords to match. A
number that is formulated with a percentage denotes that a percentage of the query keywords must
match. 1
denotes that at least one query keyword must match.2<80% 6<50%
denotes that when there are fewer than 3 keywords, both of the keywords must be found in the document. When there are 3 - 6 keywords, 80% of the keywords must be found in the document. When there are more than 6 keywords, 50% of the keywords must be found in the document.For example, if a shopper searches for 3 keywords, 80% of the 3 keywords equals 2.4. Rounded down, results that match at least 2 of the 3 entered keywords are returned.
Depending on the length of the query sent to Solr, minMatch calculates the minimum number of
terms that have to match before products are returned. For example, if shopper's search query
contains 6 words:
- mm=2: products whose indexed fields containing at least 2 out of this 6 terms are returned
- mm=50%: products whose indexed fields containing at least 3 out of this 6 terms are returned
- mm=10: Solr lowers mm to 6 (to match query length), and products that match all 6 words are returned
Note: If you use minimum match, it is recommended that you apply interim fix JR54149 to enable the runtime query expansion algorithm. This algorithm is primarily
used with minimum match and search term associations; however you can also enable the algorithm
regardless of the search features that your site uses. Multiple-word search results are improved
because the query is enclosed within parentheses and the query length is better controlled. For more
information, see Combining minimum match with search term associations (by using the query-time expansion algorithm).
Phrase slop
Specifies how far apart the indexed search terms are in the document to influence relevancy. Phrase slop defines the amount of slop on phrase queries that are built for phrase fields.
For example, if you set a phrase slop of 1
for the red
shirt search term then red shirt is more relevant than
red striped long sleeve shirt.