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.

her. In addition to the all option, this parameter can be specified multiple times to indicate multiple choices,<br />

but none will override all other options.<br />

The facet.range.method Parameter<br />

The facet.range.method parameter selects the type of algorithm or method <strong>Solr</strong> should use for range<br />

faceting. Both methods produce the same results, but performance may vary.<br />

Method<br />

filter<br />

dv<br />

Description<br />

This method generates the ranges based on other facet.range parameters, and for each of them<br />

executes a filter that later intersects with the main query resultset to get the count. It will make<br />

use of the filterCache, so it will benefit of a cache large enough to contain all ranges.<br />

This method iterates the documents that match the main query, and for each of them finds the<br />

correct range for the value. This method will make use of docValues (if enabled for the field) or<br />

fieldCache. "dv" method is not supported for field type DateRangeField or when using group.fac<br />

ets.<br />

Default value for this parameter is "filter".<br />

The facet.mincount Parameter in Range Faceting<br />

The facet.mincount parameter, the same one as used in field faceting is also applied to range faceting.<br />

When used, no ranges with a count below the minimum will be included in the response.<br />

Date Ranges & Time Zones<br />

Range faceting on date fields is a common situation where the TZ parameter can be useful to ensure<br />

that the "facet counts per day" or "facet counts per month" are based on a meaningful definition of<br />

when a given day/month "starts" relative to a particular TimeZone.<br />

For more information, see the examples in the Working with Dates section.<br />

Pivot (Decision Tree) Faceting<br />

Pivoting is a summarization tool that lets you automatically sort, count, total or average data stored in a table.<br />

The results are typically displayed in a second table showing the summarized data. Pivot faceting lets you<br />

create a summary table of the results from a faceting documents by multiple fields.<br />

Another way to look at it is that the query produces a Decision Tree, in that <strong>Solr</strong> tells you "for facet A, the<br />

constraints/counts are X/N, Y/M, etc. If you were to constrain A by X, then the constraint counts for B would<br />

be S/P, T/Q, etc.". In other words, it tells you in advance what the "next" set of facet results would be for a<br />

field if you apply a constraint from the current facet results.<br />

facet.pivot<br />

The facet.pivot parameter defines the fields to use for the pivot. Multiple facet.pivot values will create<br />

multiple "facet_pivot" sections in the response. Separate each list of fields with a comma.<br />

facet.pivot.mincount<br />

The facet.pivot.mincount parameter defines the minimum number of documents that need to match in<br />

order for the facet to be included in results. The default is 1.<br />

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

302

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

Saved successfully!

Ooh no, something went wrong!