You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2018/04/03 22:00:30 UTC

[2/2] lucene-solr:branch_7x: SOLR-12165: Ref Guide: DisMax default mm param value is improperly documented as 100%

SOLR-12165: Ref Guide: DisMax default mm param value is improperly documented as 100%


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/56834dfa
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/56834dfa
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/56834dfa

Branch: refs/heads/branch_7x
Commit: 56834dfa2b6319990f1bebd2097afdc2e6c67a4c
Parents: 606cfd5
Author: Steve Rowe <sa...@apache.org>
Authored: Tue Apr 3 17:59:34 2018 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Tue Apr 3 18:00:09 2018 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                             | 2 ++
 solr/solr-ref-guide/src/the-dismax-query-parser.adoc         | 2 +-
 .../solr-ref-guide/src/the-extended-dismax-query-parser.adoc | 8 ++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/56834dfa/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9645ea8..ea1ff7a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -140,6 +140,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.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/56834dfa/solr/solr-ref-guide/src/the-dismax-query-parser.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-dismax-query-parser.adoc b/solr/solr-ref-guide/src/the-dismax-query-parser.adoc
index bb06ae1..182b372 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) Parameter

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/56834dfa/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc b/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc
index 35673f1..a95aa91 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.
 +