Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sounds like you want the DisMax "minimum match" parameter. I wrote a blog article on the concept here a little while: <a href="http://blog.websolr.com/post/1299174416" rel="nofollow">http://blog.websolr.com/post/1299174416</a>. There's also the <a href="http://wiki.apache.org/solr/DisMaxQParserPlugin#mm_.28Minimum_.27Should.27_Match.29" rel="nofollow">Solr wiki on minimum match</a>.</p> <p>The "minimum match" concept is applied against all the "optional" terms in your query -- terms that aren't explicitly specified, using +/-, whether they are "+mandatory" or "-prohibited". By default, the minimum match is 100%, meaning that 100% of the optional terms must be present. In other words, all of your terms are considered mandatory.</p> <p>This is why your longer query isn't currently matching documents containing shorter fragments of that phrase. The other keywords in the longer search phrase are treated as mandatory.</p> <p>If you drop the minimum match down to <code>1</code>, then only one of your optional terms will be considered mandatory. In some ways this is the opposite of the default of 100%. It's like your query of <code>quick brown fox…</code> is turned into <code>quick OR brown OR fox OR …</code> and so on.</p> <p>If you set your minimum match to <code>2</code>, then your search phrase will get broken up into groups of two terms. A search for <code>quick brown fox</code> turns into <code>(quick brown) OR (brown fox) OR (quick fox) …</code> and so on. (Excuse my psuedo-query there, I trust you see the point.)</p> <p>The minimum match parameter also supports percentages -- say, <code>20%</code> -- and some even <a href="http://lucene.apache.org/solr/api/org/apache/solr/util/doc-files/min-should-match.html" rel="nofollow">more complex expressions</a>. So there's a fair amount of tweakability.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload