Dismax works by first selecting the highest scoring sub-query of all the
sub-queries that were run. If I want to search on three fields, manu, name
and features, I can configure dismax like this:

  <requestHandler name="search_dismax" class="solr.SearchHandler" >
    <lst name="defaults">
     <str name="defType">dismax</str>
*     <float name="tie">0.0</float>*
     <str name="qf">manu name features</str>
     <str name="q.alt">*:*</str>
    </lst>
  </requestHandler>

Now I'll use this query:
http://localhost:8983/solr/select/?qt=search_dismax&q=cord

Dismax will search for the term "cord" on the 3 fields I defined in the "qf"
parameter like this:
+(features:cord | manu:cord | name:cord)

Of those 3 sub-queries dismax will pick the highest one as the "main part"
of the score. The tie parameter is used like this:
Final Score = highest scoring sub-query + (*tie* * sum of scores for all
other sub-queries)

So with a tie value of *0*, the max scoring sub-query is added to 0 * other
sub-queries
Final Score = 0.9645969 + (*0* * sum of other sub-queries)

and this results in ONLY the max sub-query being used, hence a "disjunction
max".

If I had a value of *1* for the tie parameter I get this:
Final Score = 0.9645969 + (*1* * sum of other sub-queries)

so the sum of all the other sub-queries is multiplied by 1, resulting in a
"disjunction sum".

And then, of course, values between 0 and 1 result in the
non-highest-sub-queries being multiplied by a fraction, and factoring into
the scoring that way.

-Jay



On Thu, Apr 14, 2011 at 2:04 PM, Burton-West, Tom <tburt...@umich.edu>wrote:

> Hello,
>
> I'm having trouble understanding the relationship of the word "tie" and
> "tiebreaker" to the explanation of this parameter on the wiki.
> What two (or more things) are in a tie? and how does the number in the
> range from 0 to 1 break the tie?
>
> http://wiki.apache.org/solr/DisMaxQParserPlugin#tie_.28Tie_breaker.29
>
> "A value of "0.0" makes the query a pure "disjunction max query" -- only
> the maximum scoring sub query contributes to the final score. A value of
> "1.0" makes the query a pure "disjunction sum query" where it doesn't matter
> what the maximum scoring sub query is, the final score is the sum of the sub
> scores. Typically a low value (ie: 0.1) is useful."
>
> Tom Burton-West
>
>

Reply via email to