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.

The facet.field parameter identifies a field that should be treated as a facet. It iterates over each Term in<br />

the field and generate a facet count using that Term as the constraint. This parameter can be specified<br />

multiple times in a query to select multiple facet fields.<br />

If you do not set this parameter to at least one field in the schema, none of the other parameters<br />

described in this section will have any effect.<br />

The facet.prefix Parameter<br />

The facet.prefix parameter limits the terms on which to facet to those starting with the given string prefix.<br />

This does not limit the query in any way, only the facets that would be returned in response to the query.<br />

This parameter can be specified on a per-field basis with the syntax of f..facet.prefix.<br />

The facet.contains Parameter<br />

The facet.contains parameter limits the terms on which to facet to those containing the given substring.<br />

This does not limit the query in any way, only the facets that would be returned in response to the query.<br />

This parameter can be specified on a per-field basis with the syntax of f..facet.contains.<br />

The facet.contains.ignoreCase Parameter<br />

If facet.contains is used, the facet.contains.ignoreCase parameter causes case to be ignored<br />

when matching the given substring against candidate facet terms.<br />

This parameter can be specified on a per-field basis with the syntax of f..facet.contains<br />

.ignoreCase.<br />

The facet.sort Parameter<br />

This parameter determines the ordering of the facet field constraints.<br />

facet.sort<br />

Setting<br />

count<br />

index<br />

Results<br />

Sort the constraints by count (highest count first).<br />

Return the constraints sorted in their index order (lexicographic by indexed term). For<br />

terms in the ASCII range, this will be alphabetically sorted.<br />

The default is count if facet.limit is greater than 0, otherwise, the default is index.<br />

This parameter can be specified on a per-field basis with the syntax of f..facet.sort.<br />

The facet.limit Parameter<br />

This parameter specifies the maximum number of constraint counts (essentially, the number of facets for a<br />

field that are returned) that should be returned for the facet fields. A negative value means that <strong>Solr</strong> will return<br />

unlimited number of constraint counts.<br />

The default value is 100.<br />

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

297

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

Saved successfully!

Ooh no, something went wrong!