Class ShardSearchingTestBase.NodeState.ShardIndexSearcher
Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.TestFramework.dll
Syntax
public class ShardSearchingTestBase.NodeState.ShardIndexSearcher : IndexSearcher
Constructors
ShardIndexSearcher(NodeState, long[], IndexReader, int)
Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.
Declaration
public ShardIndexSearcher(ShardSearchingTestBase.NodeState nodeState, long[] nodeVersions, IndexReader localReader, int nodeID)
Parameters
Type | Name | Description |
---|---|---|
ShardSearchingTestBase.NodeState | nodeState | |
long[] | nodeVersions | |
IndexReader | localReader | |
int | nodeID |
Properties
MyNodeID
Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.
Declaration
public int MyNodeID { get; }
Property Value
Type | Description |
---|---|
int |
Methods
CollectionStatistics(string)
Returns Lucene.Net.Search.CollectionStatistics for a field.
This can be overridden for example, to return a field's statistics across a distributed collection.Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public override CollectionStatistics CollectionStatistics(string field)
Parameters
Type | Name | Description |
---|---|---|
string | field |
Returns
Type | Description |
---|---|
CollectionStatistics |
Overrides
GetNodeVersions()
Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.
Declaration
public long[] GetNodeVersions()
Returns
Type | Description |
---|---|
long[] |
LocalSearch(Query, int)
Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.
Declaration
public virtual TopDocs LocalSearch(Query query, int numHits)
Parameters
Type | Name | Description |
---|---|---|
Query | query | |
int | numHits |
Returns
Type | Description |
---|---|
TopDocs |
LocalSearch(Query, int, Sort)
Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.
Declaration
public virtual TopFieldDocs LocalSearch(Query query, int numHits, Sort sort)
Parameters
Type | Name | Description |
---|---|---|
Query | query | |
int | numHits | |
Sort | sort |
Returns
Type | Description |
---|---|
TopFieldDocs |
LocalSearchAfter(ScoreDoc, Query, int)
Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.
Declaration
public virtual TopDocs LocalSearchAfter(ScoreDoc after, Query query, int numHits)
Parameters
Type | Name | Description |
---|---|---|
ScoreDoc | after | |
Query | query | |
int | numHits |
Returns
Type | Description |
---|---|
TopDocs |
Rewrite(Query)
Expert: called to re-write queries into primitive queries.
Declaration
public override Query Rewrite(Query original)
Parameters
Type | Name | Description |
---|---|---|
Query | original |
Returns
Type | Description |
---|---|
Query |
Overrides
Exceptions
Type | Condition |
---|---|
BooleanQuery.TooManyClausesException | If a query would exceed Lucene.Net.Search.BooleanQuery.MaxClauseCount clauses. |
ArgumentNullException |
|
Search(Query, int)
Finds the top n
hits for query
.
Declaration
public override TopDocs Search(Query query, int numHits)
Parameters
Type | Name | Description |
---|---|---|
Query | query | |
int | numHits |
Returns
Type | Description |
---|---|
TopDocs |
Overrides
Exceptions
Type | Condition |
---|---|
BooleanQuery.TooManyClausesException | If a query would exceed Lucene.Net.Search.BooleanQuery.MaxClauseCount clauses. |
ArgumentNullException |
|
Search(Query, int, Sort)
Search implementation with arbitrary sorting and no filter.
Declaration
public override TopFieldDocs Search(Query query, int numHits, Sort sort)
Parameters
Type | Name | Description |
---|---|---|
Query | query | The query to search for |
int | numHits | |
Sort | sort | The Lucene.Net.Search.Sort object |
Returns
Type | Description |
---|---|
TopFieldDocs | The top docs, sorted according to the supplied Lucene.Net.Search.Sort instance |
Overrides
Exceptions
Type | Condition |
---|---|
IOException | if there is a low-level I/O error |
ArgumentNullException |
|
SearchAfter(ScoreDoc, Query, int)
Finds the top n
hits for top query
where all results are after a previous
result (top after
).
after
,
this method can be used for efficient 'deep-paging' across potentially
large result sets.
Declaration
public override TopDocs SearchAfter(ScoreDoc after, Query query, int numHits)
Parameters
Type | Name | Description |
---|---|---|
ScoreDoc | after | |
Query | query | |
int | numHits |
Returns
Type | Description |
---|---|
TopDocs |
Overrides
Exceptions
Type | Condition |
---|---|
BooleanQuery.TooManyClausesException | If a query would exceed Lucene.Net.Search.BooleanQuery.MaxClauseCount clauses. |
ArgumentNullException |
|
TermStatistics(Term, TermContext)
Returns Lucene.Net.Search.TermStatistics for a term.
This can be overridden for example, to return a term's statistics across a distributed collection.Note
This API is experimental and might change in incompatible ways in the next release.
Declaration
public override TermStatistics TermStatistics(Term term, TermContext context)
Parameters
Type | Name | Description |
---|---|---|
Term | term | |
TermContext | context |
Returns
Type | Description |
---|---|
TermStatistics |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|