C# Class Lucene.Net.Search.QueryUtils

Utility class for sanity-checking queries.
Afficher le fichier Open project: apache/lucenenet Class Usage Examples

Méthodes publiques

Méthode Description
Check ( Query q ) : void

Check the types of things query objects should be able to do.

Check ( Random random, Query q1, IndexSearcher s, Similarity similarity ) : void

Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.

Check ( Random random, Query q1, IndexSearcher s, bool wrap, Similarity similarity ) : void
CheckEqual ( Query q1, Query q2 ) : void
CheckExplanations ( Query q, IndexSearcher s ) : void

deep check that explanations of a query 'score' correctly

CheckFirstSkipTo ( Query q, IndexSearcher s, Similarity similarity ) : void

check that first skip on just created scorers always goes to the right doc

CheckHashEquals ( Query q ) : void

check very basic hashCode and equals

CheckSkipTo ( Query q, IndexSearcher s, Similarity similarity ) : void

alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores

CheckUnequal ( Query q1, Query q2 ) : void
PurgeFieldCache ( IndexReader r ) : void
WrapUnderlyingReader ( Random random, IndexSearcher s, int edge, Similarity similarity ) : IndexSearcher

Given an IndexSearcher, returns a new IndexSearcher whose IndexReader is a MultiReader containing the Reader of the original IndexSearcher, as well as several "empty" IndexReaders -- some of which will have deleted documents in them. this new IndexSearcher should behave exactly the same as the original IndexSearcher.

Private Methods

Méthode Description
MakeEmptyIndex ( Random random, int numDocs ) : IndexReader
QueryUtils ( ) : System

Method Details

Check() public static méthode

Check the types of things query objects should be able to do.
public static Check ( Query q ) : void
q Query
Résultat void

Check() public static méthode

Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.
public static Check ( Random random, Query q1, IndexSearcher s, Similarity similarity ) : void
random System.Random
q1 Query
s IndexSearcher
similarity Similarity /// LUCENENET specific /// Removes dependency on ///
Résultat void

Check() public static méthode

public static Check ( Random random, Query q1, IndexSearcher s, bool wrap, Similarity similarity ) : void
random System.Random
q1 Query
s IndexSearcher
wrap bool
similarity Similarity /// LUCENENET specific /// Removes dependency on ///
Résultat void

CheckEqual() public static méthode

public static CheckEqual ( Query q1, Query q2 ) : void
q1 Query
q2 Query
Résultat void

CheckExplanations() public static méthode

deep check that explanations of a query 'score' correctly
public static CheckExplanations ( Query q, IndexSearcher s ) : void
q Query
s IndexSearcher
Résultat void

CheckFirstSkipTo() public static méthode

check that first skip on just created scorers always goes to the right doc
public static CheckFirstSkipTo ( Query q, IndexSearcher s, Similarity similarity ) : void
q Query
s IndexSearcher
similarity Similarity /// LUCENENET specific /// Removes dependency on ///
Résultat void

CheckHashEquals() public static méthode

check very basic hashCode and equals
public static CheckHashEquals ( Query q ) : void
q Query
Résultat void

CheckSkipTo() public static méthode

alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores
public static CheckSkipTo ( Query q, IndexSearcher s, Similarity similarity ) : void
q Query
s IndexSearcher
similarity Similarity /// LUCENENET specific /// Removes dependency on ///
Résultat void

CheckUnequal() public static méthode

public static CheckUnequal ( Query q1, Query q2 ) : void
q1 Query
q2 Query
Résultat void

PurgeFieldCache() public static méthode

public static PurgeFieldCache ( IndexReader r ) : void
r IndexReader
Résultat void

WrapUnderlyingReader() public static méthode

Given an IndexSearcher, returns a new IndexSearcher whose IndexReader is a MultiReader containing the Reader of the original IndexSearcher, as well as several "empty" IndexReaders -- some of which will have deleted documents in them. this new IndexSearcher should behave exactly the same as the original IndexSearcher.
public static WrapUnderlyingReader ( Random random, IndexSearcher s, int edge, Similarity similarity ) : IndexSearcher
random System.Random
s IndexSearcher the searcher to wrap
edge int if negative, s will be the first sub; if 0, s will be in the middle, if positive s will be the last sub
similarity Similarity /// LUCENENET specific /// Removes dependency on ///
Résultat IndexSearcher