lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl / Cominvent <>
Subject Re: optional vs. probhibited aka standard vs. dismax handler
Date Tue, 29 Jun 2010 11:24:25 GMT

In DisMax the "mm" parameter controls whether terms are required or optional. The default
is 100% which means all terms required, i.e. you do not need to add "+". You can change to
mm=0 and you will get the same behaviour as standard parser, i.e. an "OR" behaviour, where
the "+" would say that a term is required.

Using the "-" in DisMax still means prohibited.

The best way to be sure of what is really going on is to enable &debugQuery=true and inspect
what your query is parsed to.

Jan Høydahl, search solution architect
Cominvent AS -
Training in Europe -

On 29. juni 2010, at 09.41, Lukas Kahwe Smith wrote:

> Hi,
> I am a bit confused about the +/- syntax. Am I understanding it properly that when using
the normal query handler + means required and - means prohibit where as in the dismax handler
+ means required and - means optional?
> The "+" or required operator requires that the term after the "+" symbol exist somewhere
in a the field of a single document.
> The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.
> Quotes can be used to group phrases, and +/- can be used to denote mandatory and optional
clauses ... but all other Lucene query parser special characters are escaped to simplify the
user experience.
> regards,
> Lukas Kahwe Smith

View raw message