C# Класс Lucene.Net.Search.QueryUtils

Utility class for sanity-checking queries.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
MakeEmptyIndex ( Random random, int numDocs ) : IndexReader
QueryUtils ( ) : System

Описание методов

Check() публичный статический Метод

Check the types of things query objects should be able to do.
public static Check ( Query q ) : void
q Query
Результат void

Check() публичный статический Метод

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 ///
Результат void

Check() публичный статический Метод

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 ///
Результат void

CheckEqual() публичный статический Метод

public static CheckEqual ( Query q1, Query q2 ) : void
q1 Query
q2 Query
Результат void

CheckExplanations() публичный статический Метод

deep check that explanations of a query 'score' correctly
public static CheckExplanations ( Query q, IndexSearcher s ) : void
q Query
s IndexSearcher
Результат void

CheckFirstSkipTo() публичный статический Метод

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 ///
Результат void

CheckHashEquals() публичный статический Метод

check very basic hashCode and equals
public static CheckHashEquals ( Query q ) : void
q Query
Результат void

CheckSkipTo() публичный статический Метод

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 ///
Результат void

CheckUnequal() публичный статический Метод

public static CheckUnequal ( Query q1, Query q2 ) : void
q1 Query
q2 Query
Результат void

PurgeFieldCache() публичный статический Метод

public static PurgeFieldCache ( IndexReader r ) : void
r IndexReader
Результат void

WrapUnderlyingReader() публичный статический Метод

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 ///
Результат IndexSearcher