11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The exclusive Parameter<br />

You can force <strong>Solr</strong> to return only the results specified in the elevation file by adding exclusive=true to the<br />

URL:<br />

http://localhost:8983/solr/techproducts/elevate?q=ipod&df=text&debugQuery=true&exc<br />

lusive=true<br />

Document Transformers and the markExcludes Parameter<br />

The [elevated] Document Transformer can be used to annotate each document with information about<br />

whether or not it was elevated:<br />

http://localhost:8983/solr/techproducts/elevate?q=ipod&df=text&fl=id,[elevated]<br />

Likewise, it can be helpful when troubleshooting to see all matching documents – including documents that the<br />

elevation configuration would normally exclude. This is possible by using the markExcludes=true parameter,<br />

and then using the [excluded] transformer:<br />

http://localhost:8983/solr/techproducts/elevate?q=ipod&df=text&markExcludes=true&f<br />

l=id,[elevated],[excluded]<br />

The elevateIds and excludeIds Parameters<br />

When the elevation component is in use, the pre-configured list of elevations for a query can be overridden at<br />

request time to use the unique keys specified in these request parameters.<br />

For example, in the request below documents 3007WFP and 9885A004 will be elevated, and document IW-02<br />

will be excluded -- regardless of what elevations or exclusions are configured for the query "cable" in elevate.xml:<br />

http://localhost:8983/solr/techproducts/elevate?q=cable&df=text&excludeIds=IW-02&e<br />

levateIds=3007WFP,9885A004<br />

If either one of these parameters is specified at request time, the the entire elevation configuration for the query<br />

is ignored.<br />

For example, in the request below documents IW-02 and F8V7067-APL-KIT will be elevated, and no documents<br />

will be excluded – regardless of what elevations or exclusions are configured for the query "ipod" in elevate.xml:<br />

http://localhost:8983/solr/techproducts/elevate?q=ipod&df=text&elevateIds=IW-02,F8<br />

V7067-APL-KIT<br />

The fq Parameter<br />

Query elevation respects the standard filter query ( fq) parameter. That is, if the query contains the fq parameter<br />

, all results will be within that filter even if elevate.xml adds other documents to the result set.<br />

Response Writers<br />

A Response Writer generates the formatted response of a search. <strong>Solr</strong> supports a variety of Response Writers to<br />

ensure that query responses can be parsed by the appropriate language or application.<br />

The wt parameter selects the Response Writer to be used. The table below lists the most common settings for<br />

the wt parameter.<br />

wt Parameter Setting<br />

Response Writer Selected<br />

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

392

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

Saved successfully!

Ooh no, something went wrong!