|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.search.DrillSideways
public class DrillSideways
Computes drill down and sideways counts for the provided
DrillDownQuery
. 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 FacetsCollector
for each drill-down, plus one. If your
index has high number of facet labels then this will
multiply your memory usage.
Nested Class Summary | |
---|---|
static class |
DrillSideways.DrillSidewaysResult
Represents the returned result from a drill sideways search. |
Field Summary | |
---|---|
protected IndexSearcher |
searcher
|
protected SortedSetDocValuesReaderState |
state
|
protected TaxonomyReader |
taxoReader
|
Constructor Summary | |
---|---|
DrillSideways(IndexSearcher searcher,
SortedSetDocValuesReaderState state)
Create a new DrillSideways instance, assuming the categories were
indexed with SortedSetDocValuesFacetFields . |
|
DrillSideways(IndexSearcher searcher,
TaxonomyReader taxoReader)
Create a new DrillSideways instance, assuming the categories were
indexed with FacetFields . |
Method Summary | |
---|---|
protected FacetsAccumulator |
getDrillDownAccumulator(FacetSearchParams fsp)
Override this to use a custom drill-down FacetsAccumulator . |
protected FacetsAccumulator |
getDrillSidewaysAccumulator(String dim,
FacetSearchParams fsp)
Override this to use a custom drill-sideways FacetsAccumulator . |
protected boolean |
scoreSubDocsAtOnce()
Override this and return true if your collector (e.g., ToParentBlockJoinCollector) expects all sub-scorers to be positioned on the document being collected. |
DrillSideways.DrillSidewaysResult |
search(DrillDownQuery query,
Collector hitCollector,
FacetSearchParams fsp)
Search, collecting hits with a Collector , and
computing drill down and sideways counts. |
DrillSideways.DrillSidewaysResult |
search(DrillDownQuery query,
Filter filter,
FieldDoc after,
int topN,
Sort sort,
boolean doDocScores,
boolean doMaxScore,
FacetSearchParams fsp)
Search, sorting by Sort , and computing
drill down and sideways counts. |
DrillSideways.DrillSidewaysResult |
search(ScoreDoc after,
DrillDownQuery query,
int topN,
FacetSearchParams fsp)
Search, sorting by score, and computing drill down and sideways counts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final IndexSearcher searcher
protected final TaxonomyReader taxoReader
protected final SortedSetDocValuesReaderState state
Constructor Detail |
---|
public DrillSideways(IndexSearcher searcher, TaxonomyReader taxoReader)
DrillSideways
instance, assuming the categories were
indexed with FacetFields
.
public DrillSideways(IndexSearcher searcher, SortedSetDocValuesReaderState state)
DrillSideways
instance, assuming the categories were
indexed with SortedSetDocValuesFacetFields
.
Method Detail |
---|
public DrillSideways.DrillSidewaysResult search(DrillDownQuery query, Collector hitCollector, FacetSearchParams fsp) throws IOException
Collector
, and
computing drill down and sideways counts.
IOException
public DrillSideways.DrillSidewaysResult search(DrillDownQuery query, Filter filter, FieldDoc after, int topN, Sort sort, boolean doDocScores, boolean doMaxScore, FacetSearchParams fsp) throws IOException
Sort
, and computing
drill down and sideways counts.
IOException
public DrillSideways.DrillSidewaysResult search(ScoreDoc after, DrillDownQuery query, int topN, FacetSearchParams fsp) throws IOException
IOException
protected FacetsAccumulator getDrillDownAccumulator(FacetSearchParams fsp) throws IOException
FacetsAccumulator
.
IOException
protected FacetsAccumulator getDrillSidewaysAccumulator(String dim, FacetSearchParams fsp) throws IOException
FacetsAccumulator
.
IOException
protected boolean scoreSubDocsAtOnce()
Collector.acceptsDocsOutOfOrder()
: this will trick
BooleanQuery into also scoring all subDocs at once.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |