Package org.apache.lucene.demo.facet
Class RangeFacetsExample
java.lang.Object
org.apache.lucene.demo.facet.RangeFacetsExample
- All Implemented Interfaces:
Closeable,AutoCloseable
Shows simple usage of dynamic range faceting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.apache.lucene.search.TopDocsdrillDown(org.apache.lucene.facet.range.LongRange range) User drills down on the specified range.org.apache.lucene.facet.DrillSideways.DrillSidewaysResultdrillSideways(org.apache.lucene.facet.range.LongRange range) User drills down on the specified range, and also computes drill sideways counts.voidindex()Build the example index.static voidRuns the search and drill-down examples and prints the results.org.apache.lucene.facet.FacetResultsearch()User runs a query and counts facets.
-
Constructor Details
-
RangeFacetsExample
public RangeFacetsExample()Empty constructor
-
-
Method Details
-
index
Build the example index.- Throws:
IOException
-
search
User runs a query and counts facets.- Throws:
IOException
-
drillDown
public org.apache.lucene.search.TopDocs drillDown(org.apache.lucene.facet.range.LongRange range) throws IOException User drills down on the specified range.- Throws:
IOException
-
drillSideways
public org.apache.lucene.facet.DrillSideways.DrillSidewaysResult drillSideways(org.apache.lucene.facet.range.LongRange range) throws IOException User drills down on the specified range, and also computes drill sideways counts.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
main
Runs the search and drill-down examples and prints the results.- Throws:
Exception
-