Class AssertingIndexSearcher
Helper class that adds some extra checks to ensure correct usage of Lucene.Net.Search.IndexSearcher and Lucene.Net.Search.Weight.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.TestFramework.dll
Syntax
public class AssertingIndexSearcher : IndexSearcher
  Constructors
AssertingIndexSearcher(Random, IndexReader)
Helper class that adds some extra checks to ensure correct usage of Lucene.Net.Search.IndexSearcher and Lucene.Net.Search.Weight.
Declaration
public AssertingIndexSearcher(Random random, IndexReader r)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Random | random | |
| IndexReader | r | 
AssertingIndexSearcher(Random, IndexReader, TaskScheduler)
Helper class that adds some extra checks to ensure correct usage of Lucene.Net.Search.IndexSearcher and Lucene.Net.Search.Weight.
Declaration
public AssertingIndexSearcher(Random random, IndexReader r, TaskScheduler ex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Random | random | |
| IndexReader | r | |
| TaskScheduler | ex | 
AssertingIndexSearcher(Random, IndexReaderContext)
Helper class that adds some extra checks to ensure correct usage of Lucene.Net.Search.IndexSearcher and Lucene.Net.Search.Weight.
Declaration
public AssertingIndexSearcher(Random random, IndexReaderContext context)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Random | random | |
| IndexReaderContext | context | 
AssertingIndexSearcher(Random, IndexReaderContext, TaskScheduler)
Helper class that adds some extra checks to ensure correct usage of Lucene.Net.Search.IndexSearcher and Lucene.Net.Search.Weight.
Declaration
public AssertingIndexSearcher(Random random, IndexReaderContext context, TaskScheduler ex)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Random | random | |
| IndexReaderContext | context | |
| TaskScheduler | ex | 
Methods
CreateNormalizedWeight(Query)
Ensures, that the returned Lucene.Net.Search.Weight is not normalized again, which may produce wrong scores.
Declaration
public override Weight CreateNormalizedWeight(Query query)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | 
Returns
| Type | Description | 
|---|---|
| Weight | 
Overrides
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(IList<AtomicReaderContext>, Weight, ICollector)
Lower-level search API.
Collect(int) is called for every document. NOTE: this method executes the searches on all given leaves exclusively. To search across all the searchers leaves use Lucene.Net.Search.IndexSearcher.m_leafContexts.Declaration
protected override void Search(IList<AtomicReaderContext> leaves, Weight weight, ICollector collector)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IList<AtomicReaderContext> | leaves | The searchers leaves to execute the searches on  | 
      
| Weight | weight | To match documents  | 
      
| ICollector | collector | To receive hits  | 
      
Overrides
Exceptions
| Type | Condition | 
|---|---|
| BooleanQuery.TooManyClausesException | If a query would exceed Lucene.Net.Search.BooleanQuery.MaxClauseCount clauses.  | 
      
| ArgumentNullException | 
  | 
      
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| string | A string that represents the current object.  | 
      
Overrides
WrapFilter(Query, Filter)
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
protected override Query WrapFilter(Query query, Filter filter)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Query | query | |
| Filter | filter | 
Returns
| Type | Description | 
|---|---|
| Query | 
Overrides
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | 
  |