lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "ExtendedDisMax" by JanHoydahl
Date Sat, 14 Apr 2012 00:34:07 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "ExtendedDisMax" page has been changed by JanHoydahl:
http://wiki.apache.org/solr/ExtendedDisMax?action=diff&rev1=8&rev2=9

  This parser supports full Lucene !QueryParser syntax including boolean operators 'AND',
'OR', 'NOT', '+' and '-', fielded search, term boosting, fuzzy, grouping with parens, phrase
search, phrase slop, numeric ranges, wildcard search and more. If there is a syntax error
in the input, such as non-existing field name or unbalanced double-quotes, the input is gracefully
searched as literal strings.
  
  == Query Structure ==
- For each "word" in the query string, dismax builds a !DisjunctionMaxQuery object for that
word across all of the fields in the `qf` param (with the appropriate boost values and a tiebreaker
value set from the `tie` param).  These !DisjunctionMaxQuery objects are then put in a !BooleanQuery
with the minNumberShouldMatch option set according to the `mm` param.  If any other params
are specified, a larger !BooleanQuery is wrapped arround the first !BooleanQuery from the
`qf` options, and the other params (`bf`, `bq`, `pf`) are added as optional clauses.  The
only complex clause comes from from the `pf` param, which is a single !DisjuntionMaxQuery
containing the whole query 'phrase' against each of the `pf` fields.
+ For each "word" in the query string, dismax builds a !DisjunctionMaxQuery object for that
word across all of the fields in the `qf` param (with the appropriate boost values and a tiebreaker
value set from the `tie` param).  These !DisjunctionMaxQuery objects are then put in a !BooleanQuery
with the minNumberShouldMatch option set according to the `mm` param.  If any other params
are specified, a larger !BooleanQuery is wrapped arround the first !BooleanQuery from the
`qf` options, and the other params (`bf`, `bq`, `pf`, `pf2`, `pf3`) are added as optional
clauses.  The only complex clause comes from from the `pf` param, which is a single !DisjuntionMaxQuery
containing the whole query 'phrase' against each of the `pf` fields.
  
  /!\ :TODO: /!\ Need more detail on the query structure generated based on input ... a picture
would be nice.
  
@@ -55, +55 @@

  
  The format is the same as the "qf" param: a list of fields and "boosts" to associate with
each of them when making phrase queries out of the entire "q" param.
  
+ <!> [[Solr4.0]] You can also specify an optional slop factor directly in "pf" with
the syntax {{{field~slop}}}. To specify both a slop and a boost, use {{{field~slop^boost}}}.
Example: {{{title~2^10.0}}} will use the title field with a phrase slop of 2 and a boost of
10.0. A phrase slop specified here overrides the default specified in "ps". See SOLR-2058.
+ 
  === ps (Phrase Slop) ===
  Amount of slop on phrase queries built for "pf" fields (affects boosting).
  
@@ -64, +66 @@

  === ps2 (Phrase bigram slop) ===
  <!> [[Solr4.0]]. See SOLR-3351
  
- As with 'ps' but controls the slop factor for 'pf2'
+ As with 'ps' but sets default slop factor for 'pf2'. If not specified, 'ps' will be used.
  
  === pf3 (Phrase trigram fields) ===
  As with 'pf' but chops the input into tri-grams, e.g. "the brown fox jumped" is queried
as "the brown fox" "brown fox jumped"
@@ -72, +74 @@

  === ps3 (Phrase trigram slop) ===
  <!> [[Solr4.0]]. See SOLR-3351
  
- As with 'ps' but controls the slop factor for 'pf2'
+ As with 'ps' but sets default slop factor for 'pf3'. If not specified, 'ps' will be used.
  
  === tie (Tie breaker) ===
  Float value to use as tiebreaker in !DisjunctionMaxQueries (should be something much less
than 1)

Mime
View raw message