C# Class Lucene.Net.Facet.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 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. @lucene.experimental

Datei anzeigen Open project: apache/lucenenet

Protected Properties

Property Type Description
config Lucene.Net.Facet.FacetsConfig
searcher Lucene.Net.Search.IndexSearcher
state Lucene.Net.Facet.SortedSet.SortedSetDocValuesReaderState
taxoReader TaxonomyReader

Public Methods

Method Description
DrillSideways ( IndexSearcher searcher, Lucene.Net.Facet.FacetsConfig config, SortedSetDocValuesReaderState state ) : Lucene.Net.Facet.SortedSet

Create a new DrillSideways instance, assuming the categories were indexed with SortedSetDocValuesFacetField.

DrillSideways ( IndexSearcher searcher, Lucene.Net.Facet.FacetsConfig config, TaxonomyReader taxoReader ) : Lucene.Net.Facet.SortedSet

Create a new DrillSideways instance.

DrillSideways ( IndexSearcher searcher, Lucene.Net.Facet.FacetsConfig config, TaxonomyReader taxoReader, SortedSetDocValuesReaderState state ) : Lucene.Net.Facet.SortedSet

Create a new DrillSideways instance, where some dimensions were indexed with SortedSetDocValuesFacetField and others were indexed with FacetField.

Search ( DrillDownQuery query, Collector hitCollector ) : DrillSidewaysResult

Search, collecting hits with a Collector, and computing drill down and sideways counts.

Search ( DrillDownQuery query, Filter filter, FieldDoc after, int topN, Lucene.Net.Search.Sort sort, bool doDocScores, bool doMaxScore ) : DrillSidewaysResult

Search, sorting by Sort, and computing drill down and sideways counts.

Search ( DrillDownQuery query, int topN ) : DrillSidewaysResult

Search, sorting by score, and computing drill down and sideways counts.

Search ( Lucene.Net.Search.ScoreDoc after, DrillDownQuery query, int topN ) : DrillSidewaysResult

Search, sorting by score, and computing drill down and sideways counts.

Protected Methods

Method Description
BuildFacetsResult ( FacetsCollector drillDowns, FacetsCollector drillSideways, string drillSidewaysDims ) : Lucene.Net.Facet.Facets

Subclass can override to customize per-dim Facets impl.

ScoreSubDocsAtOnce ( ) : bool

Override this and return true if your collector (e.g., Join.ToParentBlockJoinCollector) expects all sub-scorers to be positioned on the document being collected. This will cause some performance loss; default is false. Note that if you return true from this method (in a subclass) be sure your collector also returns false from Collector.AcceptsDocsOutOfOrder: this will trick BooleanQuery into also scoring all subDocs at once.

Method Details

BuildFacetsResult() protected method

Subclass can override to customize per-dim Facets impl.
protected BuildFacetsResult ( FacetsCollector drillDowns, FacetsCollector drillSideways, string drillSidewaysDims ) : Lucene.Net.Facet.Facets
drillDowns FacetsCollector
drillSideways FacetsCollector
drillSidewaysDims string
return Lucene.Net.Facet.Facets

DrillSideways() public method

Create a new DrillSideways instance, assuming the categories were indexed with SortedSetDocValuesFacetField.
public DrillSideways ( IndexSearcher searcher, Lucene.Net.Facet.FacetsConfig config, SortedSetDocValuesReaderState state ) : Lucene.Net.Facet.SortedSet
searcher Lucene.Net.Search.IndexSearcher
config Lucene.Net.Facet.FacetsConfig
state Lucene.Net.Facet.SortedSet.SortedSetDocValuesReaderState
return Lucene.Net.Facet.SortedSet

DrillSideways() public method

Create a new DrillSideways instance.
public DrillSideways ( IndexSearcher searcher, Lucene.Net.Facet.FacetsConfig config, TaxonomyReader taxoReader ) : Lucene.Net.Facet.SortedSet
searcher Lucene.Net.Search.IndexSearcher
config Lucene.Net.Facet.FacetsConfig
taxoReader TaxonomyReader
return Lucene.Net.Facet.SortedSet

DrillSideways() public method

Create a new DrillSideways instance, where some dimensions were indexed with SortedSetDocValuesFacetField and others were indexed with FacetField.
public DrillSideways ( IndexSearcher searcher, Lucene.Net.Facet.FacetsConfig config, TaxonomyReader taxoReader, SortedSetDocValuesReaderState state ) : Lucene.Net.Facet.SortedSet
searcher Lucene.Net.Search.IndexSearcher
config Lucene.Net.Facet.FacetsConfig
taxoReader TaxonomyReader
state Lucene.Net.Facet.SortedSet.SortedSetDocValuesReaderState
return Lucene.Net.Facet.SortedSet

ScoreSubDocsAtOnce() protected method

Override this and return true if your collector (e.g., Join.ToParentBlockJoinCollector) expects all sub-scorers to be positioned on the document being collected. This will cause some performance loss; default is false. Note that if you return true from this method (in a subclass) be sure your collector also returns false from Collector.AcceptsDocsOutOfOrder: this will trick BooleanQuery into also scoring all subDocs at once.
protected ScoreSubDocsAtOnce ( ) : bool
return bool

Search() public method

Search, collecting hits with a Collector, and computing drill down and sideways counts.
public Search ( DrillDownQuery query, Collector hitCollector ) : DrillSidewaysResult
query DrillDownQuery
hitCollector Lucene.Net.Search.Collector
return DrillSidewaysResult

Search() public method

Search, sorting by Sort, and computing drill down and sideways counts.
public Search ( DrillDownQuery query, Filter filter, FieldDoc after, int topN, Lucene.Net.Search.Sort sort, bool doDocScores, bool doMaxScore ) : DrillSidewaysResult
query DrillDownQuery
filter Lucene.Net.Search.Filter
after Lucene.Net.Search.FieldDoc
topN int
sort Lucene.Net.Search.Sort
doDocScores bool
doMaxScore bool
return DrillSidewaysResult

Search() public method

Search, sorting by score, and computing drill down and sideways counts.
public Search ( DrillDownQuery query, int topN ) : DrillSidewaysResult
query DrillDownQuery
topN int
return DrillSidewaysResult

Search() public method

Search, sorting by score, and computing drill down and sideways counts.
public Search ( Lucene.Net.Search.ScoreDoc after, DrillDownQuery query, int topN ) : DrillSidewaysResult
after Lucene.Net.Search.ScoreDoc
query DrillDownQuery
topN int
return DrillSidewaysResult

Property Details

config protected_oe property

FacetsConfig passed to constructor.
protected FacetsConfig,Lucene.Net.Facet config
return Lucene.Net.Facet.FacetsConfig

searcher protected_oe property

IndexSearcher passed to constructor.
protected IndexSearcher,Lucene.Net.Search searcher
return Lucene.Net.Search.IndexSearcher

state protected_oe property

SortedSetDocValuesReaderState passed to constructor; can be null.
protected SortedSetDocValuesReaderState,Lucene.Net.Facet.SortedSet state
return Lucene.Net.Facet.SortedSet.SortedSetDocValuesReaderState

taxoReader protected_oe property

TaxonomyReader passed to constructor.
protected TaxonomyReader taxoReader
return TaxonomyReader