Package org.apache.lucene.facet
Class DrillSideways
- java.lang.Object
-
- org.apache.lucene.facet.DrillSideways
-
public class DrillSideways extends java.lang.ObjectComputes drill down and sideways counts for the providedDrillDownQuery. Drill sideways counts include alternative values/aggregates for the drill-down dimensions so that a dimension does not disappear after the user drills down into it.Use one of the static search methods to do the search, and then get the hits and facet results from the returned
DrillSideways.DrillSidewaysResult.NOTE: this allocates one
FacetsCollectorfor each drill-down, plus one. If your index has high number of facet labels then this will multiply your memory usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDrillSideways.DrillSidewaysResult
-
Constructor Summary
Constructors Constructor Description DrillSideways(IndexSearcher searcher, FacetsConfig config, SortedSetDocValuesReaderState state)Create a newDrillSidewaysinstance, assuming the categories were indexed withSortedSetDocValuesFacetField.DrillSideways(IndexSearcher searcher, FacetsConfig config, TaxonomyReader taxoReader)Create a newDrillSidewaysinstance.DrillSideways(IndexSearcher searcher, FacetsConfig config, TaxonomyReader taxoReader, SortedSetDocValuesReaderState state)Create a newDrillSidewaysinstance, where some dimensions were indexed withSortedSetDocValuesFacetFieldand others were indexed withFacetField.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DrillSideways.DrillSidewaysResultsearch(DrillDownQuery query, int topN)Search, sorting by score, and computing drill down and sideways counts.DrillSideways.DrillSidewaysResultsearch(DrillDownQuery query, Collector hitCollector)Search, collecting hits with aCollector, and computing drill down and sideways counts.DrillSideways.DrillSidewaysResultsearch(DrillDownQuery query, Filter filter, FieldDoc after, int topN, Sort sort, boolean doDocScores, boolean doMaxScore)Search, sorting bySort, and computing drill down and sideways counts.DrillSideways.DrillSidewaysResultsearch(ScoreDoc after, DrillDownQuery query, int topN)Search, sorting by score, and computing drill down and sideways counts.
-
-
-
Constructor Detail
-
DrillSideways
public DrillSideways(IndexSearcher searcher, FacetsConfig config, TaxonomyReader taxoReader)
Create a newDrillSidewaysinstance.
-
DrillSideways
public DrillSideways(IndexSearcher searcher, FacetsConfig config, SortedSetDocValuesReaderState state)
Create a newDrillSidewaysinstance, assuming the categories were indexed withSortedSetDocValuesFacetField.
-
DrillSideways
public DrillSideways(IndexSearcher searcher, FacetsConfig config, TaxonomyReader taxoReader, SortedSetDocValuesReaderState state)
Create a newDrillSidewaysinstance, where some dimensions were indexed withSortedSetDocValuesFacetFieldand others were indexed withFacetField.
-
-
Method Detail
-
search
public DrillSideways.DrillSidewaysResult search(DrillDownQuery query, Collector hitCollector) throws java.io.IOException
Search, collecting hits with aCollector, and computing drill down and sideways counts.- Throws:
java.io.IOException
-
search
public DrillSideways.DrillSidewaysResult search(DrillDownQuery query, Filter filter, FieldDoc after, int topN, Sort sort, boolean doDocScores, boolean doMaxScore) throws java.io.IOException
Search, sorting bySort, and computing drill down and sideways counts.- Throws:
java.io.IOException
-
search
public DrillSideways.DrillSidewaysResult search(DrillDownQuery query, int topN) throws java.io.IOException
Search, sorting by score, and computing drill down and sideways counts.- Throws:
java.io.IOException
-
search
public DrillSideways.DrillSidewaysResult search(ScoreDoc after, DrillDownQuery query, int topN) throws java.io.IOException
Search, sorting by score, and computing drill down and sideways counts.- Throws:
java.io.IOException
-
-