Apache Lucene open-source search software
SOLR-12165: Ref Guide: DisMax default mm param value is improperly documented as 100%
Steve Roweb87cbc2f75de
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 2b40c3b449e..286d1c5b2e0 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -159,6 +159,8 @@ Other Changes* SOLR-12095: AutoScalingHandler validates trigger configurations before updating Zookeeper. (ab)+* SOLR-12165: Ref Guide: DisMax default mm param value is improperly documented as 100%. (Steve Rowe)+================== 7.3.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.diff --git a/solr/solr-ref-guide/src/the-dismax-query-parser.adoc b/solr/solr-ref-guide/src/the-dismax-query-parser.adocindex bb06ae1a113..182b37243c7 100644--- a/solr/solr-ref-guide/src/the-dismax-query-parser.adoc+++ b/solr/solr-ref-guide/src/the-dismax-query-parser.adoc@@ -84,7 +84,7 @@ When specifying `mm` values, keep in mind the following:* No matter what number the calculation arrives at, Solr will never use a value greater than the number of optional clauses, or a value less than 1. In other words, no matter how low or how high the calculated result, the minimum number of required matches will never be less than 1 or greater than the number of clauses.* When searching across multiple fields that are configured with different query analyzers, the number of optional clauses may differ between the fields. In such a case, the value specified by mm applies to the maximum number of optional clauses. For example, if a query clause is treated as stopword for one of the fields, the number of optional clauses for that field will be smaller than for the other fields. A query with such a stopword clause would not return a match in that field if mm is set to 100% because the removed clause does not count as matched.-The default value of `mm` is 100% (meaning that all clauses must match).+The default value of `mm` is 0% (all clauses optional), unless `q.op` is specified as "AND", in which case `mm` defaults to 100% (all clauses required).=== pf (Phrase Fields) Parameterdiff --git a/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc b/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adocindex 35673f1fa39..a95aa91c876 100644--- a/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc+++ b/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc@@ -38,6 +38,14 @@ In addition to all the <<the-dismax-query-parser.adoc#dismax-query-parser-parame`sow`::Split on whitespace. If set to `true`, text analysis is invoked separately for each individual whitespace-separated term. The default is `false`; whitespace-separated term sequences will be provided to text analysis in one shot, enabling proper function of analysis filters that operate over term sequences, e.g., multi-word synonyms and shingles.+`mm`::+ Minimum should match. See the <<the-dismax-query-parser.adoc#mm-minimum-should-match-parameter,DisMax mm parameter>> for a description of `mm`. The default eDisMax `mm` value differs from that of DisMax:+++* The default `mm` value is 0%:+** if the query contains an explicit operator other than "AND" ("-", "+", "OR", "NOT"); or+** if `q.op` is "OR" or is not specified.+* The default `mm` value is 100% if `q.op` is "AND" and the query does not contain any explicit operators other than "AND".+`mm.autoRelax`::If `true`, the number of clauses required (<<the-dismax-query-parser.adoc#mm-minimum-should-match-parameter,minimum should match>>) will automatically be relaxed if a clause is removed (by e.g., stopwords filter) from some but not all <<the-dismax-query-parser.adoc#qf-query-fields-parameter,`qf`>> fields. Use this parameter as a workaround if you experience that queries return zero hits due to uneven stopword removal between the `qf` fields.+