|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.QueryUtils
public class QueryUtils
Utility class for sanity-checking queries.
Constructor Summary | |
---|---|
QueryUtils()
|
Method Summary | |
---|---|
static void |
check(Query q)
Check the types of things query objects should be able to do. |
static void |
check(Random random,
Query q1,
Searcher s)
Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher. |
static void |
check(Random random,
Query q1,
Searcher s,
boolean wrap)
|
static void |
checkEqual(Query q1,
Query q2)
|
static void |
checkExplanations(Query q,
Searcher s)
deep check that explanations of a query 'score' correctly |
static void |
checkHashEquals(Query q)
check very basic hashCode and equals |
static void |
checkSkipTo(Query q,
IndexSearcher s)
alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores |
static void |
checkUnequal(Query q1,
Query q2)
|
static MultiSearcher |
wrapSearcher(Random random,
Searcher s,
int edge)
Given a Searcher, returns a new MultiSearcher wrapping the the original Searcher, as well as several "empty" IndexSearchers -- some of which will have deleted documents in them. |
static IndexSearcher |
wrapUnderlyingReader(Random random,
IndexSearcher s,
int edge)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryUtils()
Method Detail |
---|
public static void check(Query q)
public static void checkHashEquals(Query q)
public static void checkEqual(Query q1, Query q2)
public static void checkUnequal(Query q1, Query q2)
public static void checkExplanations(Query q, Searcher s) throws IOException
IOException
public static void check(Random random, Query q1, Searcher s)
check(Query)
,
checkFirstSkipTo(org.apache.lucene.search.Query, org.apache.lucene.search.IndexSearcher)
,
checkSkipTo(org.apache.lucene.search.Query, org.apache.lucene.search.IndexSearcher)
,
checkExplanations(org.apache.lucene.search.Query, org.apache.lucene.search.Searcher)
,
checkSerialization(org.apache.lucene.search.Query, org.apache.lucene.search.Searcher)
,
checkEqual(org.apache.lucene.search.Query, org.apache.lucene.search.Query)
public static void check(Random random, Query q1, Searcher s, boolean wrap)
public static IndexSearcher wrapUnderlyingReader(Random random, IndexSearcher s, int edge) throws IOException
s
- the searcher to wrapedge
- if negative, s will be the first sub; if 0, s will be in the middle, if positive s will be the last sub
IOException
public static MultiSearcher wrapSearcher(Random random, Searcher s, int edge) throws IOException
s
- the Searcher to wrapedge
- if negative, s will be the first sub; if 0, s will be in hte middle, if positive s will be the last sub
IOException
public static void checkSkipTo(Query q, IndexSearcher s) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |