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.

and exclude those filters when faceting on doctype.<br />

q=mainquery&fq=status:public&fq={!tag=dt}doctype:pdf&facet=true&facet.fie<br />

ld={!ex=dt}doctype<br />

Filter exclusion is supported for all types of facets. Both the tag and ex local parameters may specify<br />

multiple values by separating them with commas.<br />

Changing the Output Key<br />

To change the output key for a faceting command, specify a new name with the key local parameter. For<br />

example:<br />

facet.field={!ex=dt key=mylabel}doctype<br />

The parameter setting above causes the field facet results for the "doctype" field to be returned using the key<br />

"mylabel" rather than "doctype" in the response. This can be helpful when faceting on the same field multiple<br />

times with different exclusions.<br />

Related Topics<br />

SimpleFacetParameters from the <strong>Solr</strong> Wiki.<br />

Heatmap Faceting (Spatial)<br />

BlockJoin Faceting<br />

It's a common requirement to aggregate children facet counts by their parents, i.e., if a parent document has<br />

several children documents, all of them need to increment facet value count only once. This functionality is<br />

provided by two search components with slightly different performance: the BlockJoinFacetComponent, and<br />

the BlockJoinDocSetFacetComponent.<br />

These components are considered experimental, and must be explicitly enabled for a request handler in solrco<br />

nfig.xml, in the same way as any other search component.<br />

This example shows how you could add both search components to solrconfig.xml and define them in two<br />

different request handlers:<br />

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

311

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

Saved successfully!

Ooh no, something went wrong!