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.

is equivalent to:<br />

q={!type=dismax qf=myfield}solr rocks<br />

If no "type" is specified (either explicitly or implicitly) then the lucene parser is used by default. Thus<br />

fq={!df=summary}solr rocks<br />

is equivilent to:<br />

fq={!type=lucene df=summary}solr rocks<br />

Specifying the Parameter Value with the ' v' Key<br />

A special key of v within local parameters is an alternate way to specify the value of that parameter.<br />

q={!dismax qf=myfield}solr rocks<br />

is equivalent to<br />

q={!type=dismax qf=myfield v='solr rocks'}<br />

Parameter Dereferencing<br />

Parameter dereferencing or indirection lets you use the value of another argument rather than specifying it<br />

directly. This can be used to simplify queries, decouple user input from query parameters, or decouple front-end<br />

GUI parameters from defaults set in solrconfig.xml.<br />

q={!dismax qf=myfield}solr rocks<br />

is equivalent to:<br />

q={!type=dismax qf=myfield v=$qq}&qq=solr rocks<br />

Other Parsers<br />

In addition to the main query parsers discussed earlier, there are several other query parsers that can be used<br />

instead of or in conjunction with the main parsers for specific purposes. This section details the other parsers,<br />

and gives examples for how they might be used.<br />

Many of these parsers are expressed the same way as Local Parameters in Queries.<br />

Query parsers discussed in this section:<br />

Block Join Query Parsers<br />

Boost Query Parser<br />

Collapsing Query Parser<br />

Complex Phrase Query Parser<br />

Field Query Parser<br />

Function Query Parser<br />

Function Range Query Parser<br />

Graph Query Parser<br />

Join Query Parser<br />

Lucene Query Parser<br />

Max Score Query Parser<br />

More Like This Query Parser<br />

Nested Query Parser<br />

Old Lucene Query Parser<br />

Prefix Query Parser<br />

Raw Query Parser<br />

Re-Ranking Query Parser<br />

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

279

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

Saved successfully!

Ooh no, something went wrong!