Package org.apache.lucene.sandbox.facet.utils
package org.apache.lucene.sandbox.facet.utils
Sandbox faceting: utility classes to make it easier to use the new API for standard use cases.
Create a FacetBuilder
for each facet request you
have, use FacetOrchestrator
or DrillSidewaysFacetOrchestrator
to complete facet requests
for a query, and call FacetBuilder.getResult()
to
get final results.
Which FacetBuilder
to use?
- Use implementation specific to your use case, e.g.
TaxonomyFacetBuilder
for taxonomy fields (FacetField
),RangeFacetBuilderFactory
for range facets,LongValueFacetBuilder
for numeric fields. - Use
CommonFacetBuilder
for other cases where you can provideFacetCutter
andOrdToLabel
.
There is no implementation for your use case?
- Implement
FacetCutter
,OrdToLabel
and/orFacetRecorder
for your use case. Seeorg.apache.lucene.sandbox.facet
for low level API overview. - Implement
FacetBuilder
for your use case unlessCommonFacetBuilder
is sufficient, or use low level API directly.
See SandboxFacetsExample for examples.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
ClassesClassDescriptionCollection of static methods to provide most common comparables for sandbox faceting.Used for
ComparableUtils.byCount(CountFacetRecorder, LongValueFacetCutter)
result.Used forComparableUtils.byOrdinal()
result.Utility class to orchestrateFacetBuilder
s to collect facets usingDrillSideways
.End-to-end (request, collection and results) management of a single facet request.Utility class to orchestrateFacetBuilder
s to setup and exec collection for multiple facets.FacetBuilder
for distinct numeric field values.FacetBuilder
factory for faceting types base on numeric fields.FacetBuilder
for taxonomy facets.