Package org.apache.lucene.demo.facet
Class RangeFacetsExample
- java.lang.Object
-
- org.apache.lucene.demo.facet.RangeFacetsExample
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class RangeFacetsExample extends Object implements Closeable
Shows simple usage of dynamic range faceting.
-
-
Constructor Summary
Constructors Constructor Description RangeFacetsExample()Empty constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()TopDocsdrillDown(LongRange range)User drills down on the specified range.DrillSideways.DrillSidewaysResultdrillSideways(LongRange range)User drills down on the specified range, and also computes drill sideways counts.voidindex()Build the example index.static voidmain(String[] args)Runs the search and drill-down examples and prints the results.FacetResultsearch()User runs a query and counts facets.
-
-
-
Constructor Detail
-
RangeFacetsExample
public RangeFacetsExample()
Empty constructor
-
-
Method Detail
-
index
public void index() throws IOException
Build the example index.- Throws:
IOException
-
search
public FacetResult search() throws IOException
User runs a query and counts facets.- Throws:
IOException
-
drillDown
public TopDocs drillDown(LongRange range) throws IOException
User drills down on the specified range.- Throws:
IOException
-
drillSideways
public DrillSideways.DrillSidewaysResult drillSideways(LongRange range) throws IOException
User drills down on the specified range, and also computes drill sideways counts.- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-