Package | Description |
---|---|
org.apache.lucene.queries.payloads |
The payloads package provides Query mechanisms for finding and using payloads.
|
org.apache.lucene.queryparser.surround.query |
This package contains SrndQuery and its subclasses.
|
org.apache.lucene.queryparser.xml |
Parser that produces Lucene Query objects from XML streams.
|
org.apache.lucene.queryparser.xml.builders |
XML Parser factories for different Lucene Query/Filters.
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.highlight |
Highlighting search terms.
|
org.apache.lucene.search.spans |
The calculus of spans.
|
org.apache.lucene.search.uhighlight |
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis.
|
org.apache.lucene.util |
Some utility classes.
|
Modifier and Type | Class and Description |
---|---|
class |
PayloadScoreQuery
A Query class that uses a
PayloadFunction to modify the score of a wrapped SpanQuery |
class |
SpanPayloadCheckQuery
Only return those matches that have a specific payload at the given position.
|
Modifier and Type | Field and Description |
---|---|
protected SpanQuery |
SpanPayloadCheckQuery.match |
Constructor and Description |
---|
PayloadScoreQuery(SpanQuery wrappedQuery,
PayloadFunction function)
|
PayloadScoreQuery(SpanQuery wrappedQuery,
PayloadFunction function,
boolean includeSpanScore)
|
PayloadScoreQuery(SpanQuery wrappedQuery,
PayloadFunction function,
PayloadDecoder decoder)
Creates a new PayloadScoreQuery that includes the underlying span scores
|
PayloadScoreQuery(SpanQuery wrappedQuery,
PayloadFunction function,
PayloadDecoder decoder,
boolean includeSpanScore)
Creates a new PayloadScoreQuery
|
SpanPayloadCheckQuery(SpanQuery match,
java.util.List<BytesRef> payloadToMatch) |
Modifier and Type | Method and Description |
---|---|
SpanQuery |
SpanNearClauseFactory.makeSpanClause() |
Modifier and Type | Method and Description |
---|---|
protected void |
SpanNearClauseFactory.addSpanQueryWeighted(SpanQuery sq,
float weight) |
Modifier and Type | Method and Description |
---|---|
SpanQuery |
CoreParser.getSpanQuery(org.w3c.dom.Element e) |
Modifier and Type | Method and Description |
---|---|
SpanQuery |
SpanNotBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
SpanQueryBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
BoostingTermBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
SpanNearBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
SpanOrTermsBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
SpanOrBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
SpanFirstBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
SpanTermBuilder.getSpanQuery(org.w3c.dom.Element e) |
SpanQuery |
SpanQueryBuilderFactory.getSpanQuery(org.w3c.dom.Element e) |
Modifier and Type | Method and Description |
---|---|
SpanQuery |
BaseExplanationTestCase.sf(java.lang.String s,
int b)
MACRO for SpanFirst(SpanTermQuery)
|
SpanQuery |
BaseExplanationTestCase.snear(SpanQuery s,
SpanQuery e,
int slop,
boolean inOrder)
MACRO for SpanNearQuery containing two SpanQueries
|
SpanQuery |
BaseExplanationTestCase.snear(SpanQuery s,
SpanQuery m,
SpanQuery e,
int slop,
boolean inOrder)
MACRO for SpanNearQuery containing three SpanQueries
|
SpanQuery |
BaseExplanationTestCase.snear(java.lang.String s,
java.lang.String e,
int slop,
boolean inOrder)
MACRO for SpanNearQuery containing two SpanTerm queries
|
SpanQuery |
BaseExplanationTestCase.snear(java.lang.String s,
java.lang.String m,
java.lang.String e,
int slop,
boolean inOrder)
MACRO for SpanNearQuery containing three SpanTerm queries
|
SpanQuery |
BaseExplanationTestCase.snot(SpanQuery i,
SpanQuery e)
MACRO for SpanNotQuery
|
SpanQuery |
BaseExplanationTestCase.sor(SpanQuery s,
SpanQuery e)
MACRO for SpanOrQuery containing two SpanQueries
|
SpanQuery |
BaseExplanationTestCase.sor(SpanQuery s,
SpanQuery m,
SpanQuery e)
MACRO for SpanOrQuery containing two SpanQueries
|
SpanQuery |
BaseExplanationTestCase.sor(java.lang.String s,
java.lang.String e)
MACRO for SpanOrQuery containing two SpanTerm queries
|
SpanQuery |
BaseExplanationTestCase.sor(java.lang.String s,
java.lang.String m,
java.lang.String e)
MACRO for SpanOrQuery containing three SpanTerm queries
|
SpanQuery |
BaseExplanationTestCase.st(java.lang.String s)
MACRO for SpanTermQuery
|
Modifier and Type | Method and Description |
---|---|
SpanQuery |
BaseExplanationTestCase.snear(SpanQuery s,
SpanQuery e,
int slop,
boolean inOrder)
MACRO for SpanNearQuery containing two SpanQueries
|
SpanQuery |
BaseExplanationTestCase.snear(SpanQuery s,
SpanQuery m,
SpanQuery e,
int slop,
boolean inOrder)
MACRO for SpanNearQuery containing three SpanQueries
|
SpanQuery |
BaseExplanationTestCase.snot(SpanQuery i,
SpanQuery e)
MACRO for SpanNotQuery
|
SpanQuery |
BaseExplanationTestCase.sor(SpanQuery s,
SpanQuery e)
MACRO for SpanOrQuery containing two SpanQueries
|
SpanQuery |
BaseExplanationTestCase.sor(SpanQuery s,
SpanQuery m,
SpanQuery e)
MACRO for SpanOrQuery containing two SpanQueries
|
Modifier and Type | Method and Description |
---|---|
protected void |
WeightedSpanTermExtractor.collectSpanQueryFields(SpanQuery spanQuery,
java.util.Set<java.lang.String> fieldNames) |
protected void |
WeightedSpanTermExtractor.extractWeightedSpanTerms(java.util.Map<java.lang.String,WeightedSpanTerm> terms,
SpanQuery spanQuery,
float boost)
|
protected boolean |
WeightedSpanTermExtractor.mustRewriteQuery(SpanQuery spanQuery) |
Modifier and Type | Class and Description |
---|---|
class |
AssertingSpanQuery
Wraps a span query with asserts
|
class |
FieldMaskingSpanQuery
Wrapper to allow
SpanQuery objects participate in composite
single-field SpanQueries by 'lying' about their search field. |
class |
SpanBoostQuery
Counterpart of
BoostQuery for spans. |
class |
SpanContainingQuery
Keep matches that contain another SpanScorer.
|
class |
SpanFirstQuery
Matches spans near the beginning of a field.
|
class |
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
Wraps any
MultiTermQuery as a SpanQuery ,
so it can be nested within other SpanQuery classes. |
class |
SpanNearQuery
Matches spans which are near one another.
|
class |
SpanNotQuery
Removes matches which overlap with another SpanQuery or which are
within x tokens before or y tokens after another SpanQuery.
|
class |
SpanOrQuery
Matches the union of its clauses.
|
class |
SpanPositionCheckQuery
Base class for filtering a SpanQuery based on the position of a match.
|
class |
SpanPositionRangeQuery
Checks to see if the
SpanPositionCheckQuery.getMatch() lies between a start and end position
See SpanFirstQuery for a derivation that is optimized for the case where start position is 0. |
class |
SpanTermQuery
Matches spans containing a term.
|
class |
SpanWithinQuery
Keep matches that are contained within another Spans.
|
Modifier and Type | Field and Description |
---|---|
protected SpanQuery |
SpanPositionCheckQuery.match |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<SpanQuery> |
SpanNearQuery.clauses |
Modifier and Type | Method and Description |
---|---|
SpanQuery[] |
SpanOrQuery.getClauses()
Return the clauses whose spans are matched.
|
SpanQuery[] |
SpanNearQuery.getClauses()
Return the clauses whose spans are matched.
|
SpanQuery |
SpanNotQuery.getExclude()
Return the SpanQuery whose matches must not overlap those returned.
|
SpanQuery |
SpanNotQuery.getInclude()
Return the SpanQuery whose matches are filtered.
|
SpanQuery |
FieldMaskingSpanQuery.getMaskedQuery() |
SpanQuery |
SpanPositionCheckQuery.getMatch() |
SpanQuery |
SpanBoostQuery.getQuery()
Return the wrapped
SpanQuery . |
abstract SpanQuery |
SpanMultiTermQueryWrapper.SpanRewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
SpanQuery |
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite.rewrite(IndexReader reader,
MultiTermQuery query) |
static SpanQuery |
SpanTestUtil.spanContainingQuery(SpanQuery big,
SpanQuery little)
Makes a new SpanContainingQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanFirstQuery(SpanQuery query,
int end)
Makes a new SpanFirstQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanNearOrderedQuery(int slop,
SpanQuery... subqueries)
Makes a new ordered SpanNearQuery (with additional asserts)
|
static SpanQuery |
SpanTestUtil.spanNearOrderedQuery(java.lang.String field,
int slop,
java.lang.String... terms)
Makes a new ordered SpanNearQuery (with additional asserts) from the provided
terms |
static SpanQuery |
SpanTestUtil.spanNearUnorderedQuery(int slop,
SpanQuery... subqueries)
Makes a new unordered SpanNearQuery (with additional asserts)
|
static SpanQuery |
SpanTestUtil.spanNearUnorderedQuery(java.lang.String field,
int slop,
java.lang.String... terms)
Makes a new unordered SpanNearQuery (with additional asserts) from the provided
terms |
static SpanQuery |
SpanTestUtil.spanNotQuery(SpanQuery include,
SpanQuery exclude)
Makes a new SpanNotQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanNotQuery(SpanQuery include,
SpanQuery exclude,
int pre,
int post)
Makes a new SpanNotQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanOrQuery(SpanQuery... subqueries)
Makes a new SpanOrQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanOrQuery(java.lang.String field,
java.lang.String... terms)
Makes a new SpanOrQuery (with additional asserts) from the provided
terms . |
static SpanQuery |
SpanTestUtil.spanPositionRangeQuery(SpanQuery query,
int start,
int end)
Makes a new SpanPositionRangeQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanQuery(SpanQuery query)
Adds additional asserts to a spanquery.
|
static SpanQuery |
SpanTestUtil.spanTermQuery(java.lang.String field,
java.lang.String term)
Makes a new SpanTermQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanWithinQuery(SpanQuery big,
SpanQuery little)
Makes a new SpanWithinQuery (with additional asserts).
|
Modifier and Type | Method and Description |
---|---|
SpanNearQuery.Builder |
SpanNearQuery.Builder.addClause(SpanQuery clause)
Add a new clause
|
static SpanQuery |
SpanTestUtil.spanContainingQuery(SpanQuery big,
SpanQuery little)
Makes a new SpanContainingQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanFirstQuery(SpanQuery query,
int end)
Makes a new SpanFirstQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanNearOrderedQuery(int slop,
SpanQuery... subqueries)
Makes a new ordered SpanNearQuery (with additional asserts)
|
static SpanQuery |
SpanTestUtil.spanNearUnorderedQuery(int slop,
SpanQuery... subqueries)
Makes a new unordered SpanNearQuery (with additional asserts)
|
static SpanQuery |
SpanTestUtil.spanNotQuery(SpanQuery include,
SpanQuery exclude)
Makes a new SpanNotQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanNotQuery(SpanQuery include,
SpanQuery exclude,
int pre,
int post)
Makes a new SpanNotQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanOrQuery(SpanQuery... subqueries)
Makes a new SpanOrQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanPositionRangeQuery(SpanQuery query,
int start,
int end)
Makes a new SpanPositionRangeQuery (with additional asserts).
|
static SpanQuery |
SpanTestUtil.spanQuery(SpanQuery query)
Adds additional asserts to a spanquery.
|
static SpanQuery |
SpanTestUtil.spanWithinQuery(SpanQuery big,
SpanQuery little)
Makes a new SpanWithinQuery (with additional asserts).
|
Constructor and Description |
---|
AssertingSpanQuery(SpanQuery in) |
FieldMaskingSpanQuery(SpanQuery maskedQuery,
java.lang.String maskedField) |
SpanBoostQuery(SpanQuery query,
float boost)
Sole constructor: wrap
query in such a way that the produced
scores will be boosted by boost . |
SpanContainingQuery(SpanQuery big,
SpanQuery little)
Construct a SpanContainingQuery matching spans from
big
that contain at least one spans from little . |
SpanFirstQuery(SpanQuery match,
int end)
Construct a SpanFirstQuery matching spans in
match whose end
position is less than or equal to end . |
SpanNearQuery(SpanQuery[] clausesIn,
int slop,
boolean inOrder)
Construct a SpanNearQuery.
|
SpanNotQuery(SpanQuery include,
SpanQuery exclude)
Construct a SpanNotQuery matching spans from
include which
have no overlap with spans from exclude . |
SpanNotQuery(SpanQuery include,
SpanQuery exclude,
int dist)
Construct a SpanNotQuery matching spans from
include which
have no overlap with spans from exclude within
dist tokens of include . |
SpanNotQuery(SpanQuery include,
SpanQuery exclude,
int pre,
int post)
Construct a SpanNotQuery matching spans from
include which
have no overlap with spans from exclude within
pre tokens before or post tokens of
include . |
SpanOrQuery(SpanQuery... clauses)
Construct a SpanOrQuery merging the provided clauses.
|
SpanPositionCheckQuery(SpanQuery match) |
SpanPositionRangeQuery(SpanQuery match,
int start,
int end) |
SpanWeight(SpanQuery query,
IndexSearcher searcher,
java.util.Map<Term,TermContext> termContexts,
float boost)
Create a new SpanWeight
|
SpanWithinQuery(SpanQuery big,
SpanQuery little)
Construct a SpanWithinQuery matching spans from
little
that are inside of big . |
Modifier and Type | Method and Description |
---|---|
java.util.Set<SpanQuery> |
PhraseHelper.getSpanQueries() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Boolean |
UnifiedHighlighter.requiresRewrite(SpanQuery spanQuery)
When highlighting phrases accurately, we need to know which
SpanQuery 's need to have
Query.rewrite(IndexReader) called on them. |
Constructor and Description |
---|
PhraseHelper(Query query,
java.lang.String field,
java.util.function.Predicate<java.lang.String> fieldMatcher,
java.util.function.Function<SpanQuery,java.lang.Boolean> rewriteQueryPred,
java.util.function.Function<Query,java.util.Collection<Query>> preExtractRewriteFunction,
boolean ignoreQueriesNeedingRewrite)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected SpanQuery |
QueryBuilder.createSpanQuery(TokenStream in,
java.lang.String field)
Creates a span query from the tokenstream.
|
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.