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.

...<br />

"start":"2006-01-01T00:00:00Z",<br />

"end":"2015-01-01T00:00:00Z"}}},<br />

Additional Pivot Parameters<br />

Although facet.pivot.mincount deviates in name from the facet.mincount parameter used by field<br />

faceting, many other Field faceting parameters described above can also be used with pivot faceting:<br />

facet.limit<br />

facet.offset<br />

facet.sort<br />

facet.overrequest.count<br />

facet.overrequest.ratio<br />

Interval Faceting<br />

Another supported form of faceting is interval faceting. This sounds similar to range faceting, but the<br />

functionality is really closer to doing facet queries with range queries. Interval faceting allows you to set<br />

variable intervals and count the number of documents that have values within those intervals in the specified<br />

field.<br />

Even though the same functionality can be achieved by using a facet query with range queries, the<br />

implementation of these two methods is very different and will provide different performance depending on<br />

the context. If you are concerned about the performance of your searches you should test with both options.<br />

Interval faceting tends to be better with multiple intervals for the same fields, while facet query tend to be<br />

better in environments where filter cache is more effective (static indexes for example). This method will use<br />

docValues if they are enabled for the field, will use fieldCache otherwise.<br />

Name<br />

facet.interval<br />

facet.interval.set<br />

What it does<br />

Specifies the field to facet by interval.<br />

Sets the intervals for the field.<br />

The facet.interval parameter<br />

This parameter Indicates the field where interval faceting must be applied. It can be used multiple times in the<br />

same request to indicate multiple fields.<br />

facet.interval=price&facet.interval=size<br />

The facet.interval.set parameter<br />

This parameter is used to set the intervals for the field, it can be specified multiple times to indicate multiple<br />

intervals. This parameter is global, which means that it will be used for all fields indicated with facet.inter<br />

val unless there is an override for a specific field. To override this parameter on a specific field you can use:<br />

f..facet.interval.set, for example:<br />

f.price.facet.interval.set=[0,10]&f.price.facet.interval.set=(10,100]<br />

Interval Syntax<br />

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

309

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

Saved successfully!

Ooh no, something went wrong!