11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

http://localhost:8983/solr/techproducts/select?defType=dismax&q=video&fl=name,s<br />

core,inStock<br />

http://localhost:8983/solr/techproducts/select?defType=dismax&q=video&qt=instoc<br />

k&fl=name,score,inStock<br />

One of the other really cool features in this handler is robust support for specifying the<br />

"BooleanQuery.minimumNumberShouldMatch" you want to be used based on how many terms are in your user's<br />

query. These allows flexibility for typos and partial matches. For the dismax handler, one and two word queries<br />

require that all of the optional clauses match, but for three to five word queries one missing word is allowed.<br />

http://localhost:8983/solr/techproducts/select?defType=dismax&q=belkin+ipod<br />

http://localhost:8983/solr/techproducts/select?defType=dismax&q=belkin+ipod+gib<br />

berish<br />

http://localhost:8983/solr/techproducts/select?defType=dismax&q=belkin+ipod+app<br />

le<br />

Just like the StandardRequestHandler, it supports the debugQuery option to viewing the parsed query, and the<br />

score explanations for each document.<br />

http://localhost:8983/solr/techproducts/select?defType=dismax&q=belkin+ipod+gib<br />

berish&debugQuery=true<br />

http://localhost:8983/solr/techproducts/select?defType=dismax&q=video+card&debu<br />

gQuery=true<br />

The Extended DisMax Query Parser<br />

The Extended DisMax (eDisMax) query parser is an improved version of the DisMax query parser. In addition to<br />

supporting all the DisMax query parser parameters, Extended Dismax:<br />

supports the full Lucene query parser syntax.<br />

supports queries such as AND, OR, NOT, -, and +.<br />

treats "and" and "or" as "AND" and "OR" in Lucene syntax mode.<br />

respects the 'magic field' names _val_ and _query_. These are not a real fields in the Schema, but if<br />

used it helps do special things (like a function query in the case of _val_ or a nested query in the case of<br />

_query_). If _val_ is used in a term or phrase query, the value is parsed as a function.<br />

includes improved smart partial escaping in the case of syntax errors; fielded queries, +/-, and phrase<br />

queries are still supported in this mode.<br />

improves proximity boosting by using word shingles; you do not need the query to match all words in the<br />

document before proximity boosting is applied.<br />

includes advanced stopword handling: stopwords are not required in the mandatory part of the query but<br />

are still used in the proximity boosting part. If a query consists of all stopwords, such as "to be or not to<br />

be", then all words are required.<br />

includes improved boost function: in Extended DisMax, the boost function is a multiplier rather than an<br />

addend, improving your boost results; the additive boost functions of DisMax ( bf and bq) are also<br />

supported.<br />

supports pure negative nested queries: queries such as +foo (-foo) will match all documents.<br />

lets you specify which fields the end user is allowed to query, and to disallow direct fielded searches.<br />

Extended DisMax Parameters<br />

In addition to all the<br />

The mm.autoRelax Parameter<br />

DisMax parameters, Extended DisMax includes these query parameters:<br />

If true, the number of clauses required ( minimum should match)<br />

will automatically be relaxed if a clause is<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

265

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!