Package org.apache.lucene.demo.facet
Class CustomFacetSetExample
java.lang.Object
org.apache.lucene.demo.facet.CustomFacetSetExample
Shows usage of indexing and searching
FacetSetsField
with a custom FacetSet
implementation. Unlike the out of the box FacetSet
implementations, this example shows
how to mix and match dimensions of different types, as well as implementing a custom FacetSetMatcher
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AFacetSetMatcher
which matches facet sets only by their temperature dimension, ignoring the date.static class
AFacetSet
which encodes a temperature reading in a date (long) and degrees (celsius; float). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Runs the search and drill-down examples and prints the results.Runs the custom range matching example.Runs the exact matching example.Runs the exact matching with fast match query example.Runs the range matching example.
-
Constructor Details
-
CustomFacetSetExample
public CustomFacetSetExample()Empty constructor
-
-
Method Details
-
runExactMatching
Runs the exact matching example.- Throws:
IOException
-
runExactMatchingWithFastMatchQuery
Runs the exact matching with fast match query example.- Throws:
IOException
-
runRangeMatching
Runs the range matching example.- Throws:
IOException
-
runCustomRangeMatching
Runs the custom range matching example.- Throws:
IOException
-
main
Runs the search and drill-down examples and prints the results.- Throws:
Exception
-