Package | Description |
---|---|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.function |
Programmatic control over documents scores.
|
org.apache.lucene.search.join |
This modules support index-time and query-time joins.
|
org.apache.lucene.search.payloads |
The payloads package provides Query mechanisms for finding and using payloads.
|
org.apache.lucene.search.spans |
The calculus of spans.
|
Modifier and Type | Class and Description |
---|---|
class |
AssertingIndexSearcher
Helper class that adds some extra checks to ensure correct
usage of
IndexSearcher and Weight . |
static class |
CheckHits.ExplanationAssertingSearcher
an IndexSearcher that implicitly checks hte explanation of every match
whenever it executes a search.
|
class |
IndexSearcher
Implements search over a single IndexReader.
|
class |
MultiSearcher
Deprecated.
If you are using MultiSearcher over
IndexSearchers, please use MultiReader instead; this class
does not properly handle certain kinds of queries (see LUCENE-2756).
|
class |
ParallelMultiSearcher
Deprecated.
Please pass an ExecutorService to
IndexSearcher , instead. |
Modifier and Type | Method and Description |
---|---|
static void |
QueryUtils.check(Random random,
Query q1,
Searcher s)
Various query sanity checks on a searcher, some checks are only done for
instanceof IndexSearcher.
|
static void |
QueryUtils.check(Random random,
Query q1,
Searcher s,
boolean wrap) |
static void |
QueryUtils.checkExplanations(Query q,
Searcher s)
deep check that explanations of a query 'score' correctly
|
static void |
CheckHits.checkExplanations(Query query,
String defaultFieldName,
Searcher searcher)
Asserts that the explanation value for every document matching a
query corresponds with the true score.
|
static void |
CheckHits.checkExplanations(Query query,
String defaultFieldName,
Searcher searcher,
boolean deep)
Asserts that the explanation value for every document matching a
query corresponds with the true score.
|
static void |
CheckHits.checkHitCollector(Random random,
Query query,
String defaultFieldName,
Searcher searcher,
int[] results)
Tests that a query matches the an expected set of documents using a
HitCollector.
|
static void |
CheckHits.checkHits(Random random,
Query query,
String defaultFieldName,
Searcher searcher,
int[] results)
Tests that a query matches the an expected set of documents using Hits.
|
static void |
CheckHits.checkNoMatchExplanations(Query q,
String defaultFieldName,
Searcher searcher,
int[] results)
Tests that all documents up to maxDoc which are *not* in the
expected result set, have an explanation which indicates that
the document does not match
|
Weight |
TermQuery.createWeight(Searcher searcher) |
Weight |
Query.createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query.
|
Weight |
PhraseQuery.createWeight(Searcher searcher) |
Weight |
MultiPhraseQuery.createWeight(Searcher searcher) |
Weight |
MatchAllDocsQuery.createWeight(Searcher searcher) |
Weight |
FilteredQuery.createWeight(Searcher searcher)
Returns a Weight that applies the filter to the enclosed query's Weight.
|
Weight |
DisjunctionMaxQuery.createWeight(Searcher searcher)
Create the Weight used to score us
|
Weight |
ConstantScoreQuery.createWeight(Searcher searcher) |
Weight |
BooleanQuery.createWeight(Searcher searcher) |
Similarity |
Query.getSimilarity(Searcher searcher)
Deprecated.
Instead of using "runtime" subclassing/delegation, subclass the Weight instead.
|
Explanation.IDFExplanation |
Similarity.idfExplain(Collection<Term> terms,
Searcher searcher)
Computes a score factor for a phrase.
|
Explanation.IDFExplanation |
Similarity.idfExplain(Term term,
Searcher searcher)
This method forwards to
Similarity.idfExplain(Term,Searcher,int) by passing
searcher.docFreq(term) as the docFreq. |
Explanation.IDFExplanation |
Similarity.idfExplain(Term term,
Searcher searcher,
int docFreq)
Computes a score factor for a simple term and returns an explanation
for that score factor.
|
Weight |
Query.weight(Searcher searcher)
Deprecated.
never ever use this method in
Weight implementations.
Subclasses of Query should use Query.createWeight(org.apache.lucene.search.Searcher) , instead. |
static MultiSearcher |
QueryUtils.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.
|
Constructor and Description |
---|
BooleanQuery.BooleanWeight(Searcher searcher,
boolean disableCoord) |
CheckHits.ExplanationAsserter(Query q,
String defaultFieldName,
Searcher s)
Constructs an instance which does shallow tests on the Explanation
|
CheckHits.ExplanationAsserter(Query q,
String defaultFieldName,
Searcher s,
boolean deep) |
ConstantScoreQuery.ConstantWeight(Searcher searcher) |
DisjunctionMaxQuery.DisjunctionMaxWeight(Searcher searcher)
Construct the Weight for this Query searched by searcher.
|
Modifier and Type | Method and Description |
---|---|
Weight |
ValueSourceQuery.createWeight(Searcher searcher) |
Weight |
CustomScoreQuery.createWeight(Searcher searcher) |
Modifier and Type | Method and Description |
---|---|
Weight |
ToParentBlockJoinQuery.createWeight(Searcher searcher) |
Weight |
ToChildBlockJoinQuery.createWeight(Searcher searcher) |
Modifier and Type | Method and Description |
---|---|
Weight |
PayloadTermQuery.createWeight(Searcher searcher) |
Weight |
PayloadNearQuery.createWeight(Searcher searcher) |
Constructor and Description |
---|
PayloadNearQuery.PayloadNearSpanWeight(SpanQuery query,
Searcher searcher) |
PayloadTermQuery.PayloadTermWeight(PayloadTermQuery query,
Searcher searcher) |
Modifier and Type | Method and Description |
---|---|
Weight |
SpanQuery.createWeight(Searcher searcher) |
Weight |
FieldMaskingSpanQuery.createWeight(Searcher searcher) |
Constructor and Description |
---|
SpanWeight(SpanQuery query,
Searcher searcher) |