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.
TaxonomyFacetBuilderfor taxonomy fields (FacetField),RangeFacetBuilderFactoryfor range facets,LongValueFacetBuilderfor numeric fields. - Use
CommonFacetBuilderfor other cases where you can provideFacetCutterandOrdToLabel.
There is no implementation for your use case?
- Implement
FacetCutter,OrdToLabeland/orFacetRecorderfor your use case. Seeorg.apache.lucene.sandbox.facetfor low level API overview. - Implement
FacetBuilderfor your use case unlessCommonFacetBuilderis 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 orchestrateFacetBuilders to collect facets usingDrillSideways.End-to-end (request, collection and results) management of a single facet request.Utility class to orchestrateFacetBuilders to setup and exec collection for multiple facets.FacetBuilderfor distinct numeric field values.FacetBuilderfactory for faceting types base on numeric fields.FacetBuilderfor taxonomy facets.