Package | Description |
---|---|
org.apache.lucene.document |
The logical representation of a
Document for indexing and searching. |
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.index.memory |
High-performance single-document main memory Apache Lucene fulltext search index.
|
org.apache.lucene.payloads |
Experimental classes for interacting with payloads
|
org.apache.lucene.queries |
Filters and Queries that add to core Lucene.
|
org.apache.lucene.queries.function |
Queries that compute score based upon a function.
|
org.apache.lucene.queries.function.valuesource |
A variety of functions to use with FunctionQuery.
|
org.apache.lucene.queries.mlt |
Document similarity query generators.
|
org.apache.lucene.queries.payloads |
The payloads package provides Query mechanisms for finding and using payloads.
|
org.apache.lucene.queryparser.classic |
A simple query parser implemented with JavaCC.
|
org.apache.lucene.queryparser.complexPhrase |
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
|
org.apache.lucene.queryparser.ext |
Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
|
org.apache.lucene.queryparser.flexible.standard |
Implementation of the Lucene classic query parser using the flexible query parser frameworks
|
org.apache.lucene.queryparser.flexible.standard.builders |
Standard Lucene Query Node Builders.
|
org.apache.lucene.queryparser.simple |
A simple query parser for human-entered queries.
|
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.sandbox.queries |
Additional queries (some may have caveats or limitations)
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.grouping |
Grouping.
|
org.apache.lucene.search.highlight |
Highlighting search terms.
|
org.apache.lucene.search.intervals |
Intervals queries
|
org.apache.lucene.search.join |
Support for index-time and query-time joins.
|
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.search.vectorhighlight |
Another highlighter implementation based on term vectors.
|
org.apache.lucene.util |
Some utility classes.
|
Modifier and Type | Method and Description |
---|---|
static Query |
LatLonPoint.newBoxQuery(java.lang.String field,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
Create a query for matching a bounding box.
|
static Query |
LatLonShape.newBoxQuery(java.lang.String field,
LatLonShape.QueryRelation queryRelation,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
create a query to find all polygons that intersect a defined bounding box
|
static Query |
DoubleRange.newContainsQuery(java.lang.String field,
double[] min,
double[] max)
Create a query for matching indexed ranges that contain the defined range.
|
static Query |
LatLonBoundingBox.newContainsQuery(java.lang.String field,
double minLat,
double minLon,
double maxLat,
double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that contain the defined
2d bounding box
|
static Query |
FloatRange.newContainsQuery(java.lang.String field,
float[] min,
float[] max)
Create a query for matching indexed float ranges that contain the defined range.
|
static Query |
InetAddressRange.newContainsQuery(java.lang.String field,
java.net.InetAddress min,
java.net.InetAddress max)
Create a query for matching indexed ip ranges that
CONTAINS the defined range. |
static Query |
IntRange.newContainsQuery(java.lang.String field,
int[] min,
int[] max)
Create a query for matching indexed ranges that contain the defined range.
|
static Query |
LongRange.newContainsQuery(java.lang.String field,
long[] min,
long[] max)
Create a query for matching indexed ranges that contain the defined range.
|
static Query |
DoubleRange.newCrossesQuery(java.lang.String field,
double[] min,
double[] max)
Create a query for matching indexed ranges that cross the defined range.
|
static Query |
LatLonBoundingBox.newCrossesQuery(java.lang.String field,
double minLat,
double minLon,
double maxLat,
double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that cross the defined
3d bounding box
|
static Query |
FloatRange.newCrossesQuery(java.lang.String field,
float[] min,
float[] max)
Create a query for matching indexed ranges that cross the defined range.
|
static Query |
InetAddressRange.newCrossesQuery(java.lang.String field,
java.net.InetAddress min,
java.net.InetAddress max)
Create a query for matching indexed ip ranges that
CROSS the defined range. |
static Query |
IntRange.newCrossesQuery(java.lang.String field,
int[] min,
int[] max)
Create a query for matching indexed ranges that cross the defined range.
|
static Query |
LongRange.newCrossesQuery(java.lang.String field,
long[] min,
long[] max)
Create a query for matching indexed ranges that cross the defined range.
|
static Query |
LatLonPoint.newDistanceQuery(java.lang.String field,
double latitude,
double longitude,
double radiusMeters)
Create a query for matching points within the specified distance of the supplied location.
|
static Query |
BigIntegerPoint.newExactQuery(java.lang.String field,
java.math.BigInteger value)
Create a query for matching an exact big integer value.
|
static Query |
BinaryPoint.newExactQuery(java.lang.String field,
byte[] value)
Create a query for matching an exact binary value.
|
static Query |
DoublePoint.newExactQuery(java.lang.String field,
double value)
Create a query for matching an exact double value.
|
static Query |
HalfFloatPoint.newExactQuery(java.lang.String field,
float value)
Create a query for matching an exact half-float value.
|
static Query |
FloatPoint.newExactQuery(java.lang.String field,
float value)
Create a query for matching an exact float value.
|
static Query |
InetAddressPoint.newExactQuery(java.lang.String field,
java.net.InetAddress value)
Create a query for matching a network address.
|
static Query |
IntPoint.newExactQuery(java.lang.String field,
int value)
Create a query for matching an exact integer value.
|
static Query |
LongPoint.newExactQuery(java.lang.String field,
long value)
Create a query for matching an exact long value.
|
static Query |
DoubleRange.newIntersectsQuery(java.lang.String field,
double[] min,
double[] max)
Create a query for matching indexed ranges that intersect the defined range.
|
static Query |
LatLonBoundingBox.newIntersectsQuery(java.lang.String field,
double minLat,
double minLon,
double maxLat,
double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that intersect the defined
3d bounding ranges
|
static Query |
FloatRange.newIntersectsQuery(java.lang.String field,
float[] min,
float[] max)
Create a query for matching indexed ranges that intersect the defined range.
|
static Query |
InetAddressRange.newIntersectsQuery(java.lang.String field,
java.net.InetAddress min,
java.net.InetAddress max)
Create a query for matching indexed ip ranges that
INTERSECT the defined range. |
static Query |
IntRange.newIntersectsQuery(java.lang.String field,
int[] min,
int[] max)
Create a query for matching indexed ranges that intersect the defined range.
|
static Query |
LongRange.newIntersectsQuery(java.lang.String field,
long[] min,
long[] max)
Create a query for matching indexed ranges that intersect the defined range.
|
static Query |
LatLonShape.newLineQuery(java.lang.String field,
LatLonShape.QueryRelation queryRelation,
Line... lines)
create a query to find all polygons that intersect a provided linestring (or array of linestrings)
note: does not support dateline crossing
|
static Query |
FeatureField.newLogQuery(java.lang.String fieldName,
java.lang.String featureName,
float weight,
float scalingFactor)
Return a new
Query that will score documents as
weight * Math.log(scalingFactor + S) where S is the value of the static feature. |
static Query |
LatLonShape.newPolygonQuery(java.lang.String field,
LatLonShape.QueryRelation queryRelation,
Polygon... polygons)
create a query to find all polygons that intersect a provided polygon (or array of polygons)
note: does not support dateline crossing
|
static Query |
LatLonPoint.newPolygonQuery(java.lang.String field,
Polygon... polygons)
Create a query for matching one or more polygons.
|
static Query |
InetAddressPoint.newPrefixQuery(java.lang.String field,
java.net.InetAddress value,
int prefixLength)
Create a prefix query for matching a CIDR network range.
|
static Query |
BigIntegerPoint.newRangeQuery(java.lang.String field,
java.math.BigInteger[] lowerValue,
java.math.BigInteger[] upperValue)
Create a range query for n-dimensional big integer values.
|
static Query |
BigIntegerPoint.newRangeQuery(java.lang.String field,
java.math.BigInteger lowerValue,
java.math.BigInteger upperValue)
Create a range query for big integer values.
|
static Query |
BinaryPoint.newRangeQuery(java.lang.String field,
byte[][] lowerValue,
byte[][] upperValue)
Create a range query for n-dimensional binary values.
|
static Query |
BinaryPoint.newRangeQuery(java.lang.String field,
byte[] lowerValue,
byte[] upperValue)
Create a range query for binary values.
|
static Query |
DoublePoint.newRangeQuery(java.lang.String field,
double[] lowerValue,
double[] upperValue)
Create a range query for n-dimensional double values.
|
static Query |
DoublePoint.newRangeQuery(java.lang.String field,
double lowerValue,
double upperValue)
Create a range query for double values.
|
static Query |
HalfFloatPoint.newRangeQuery(java.lang.String field,
float[] lowerValue,
float[] upperValue)
Create a range query for n-dimensional half-float values.
|
static Query |
FloatPoint.newRangeQuery(java.lang.String field,
float[] lowerValue,
float[] upperValue)
Create a range query for n-dimensional float values.
|
static Query |
HalfFloatPoint.newRangeQuery(java.lang.String field,
float lowerValue,
float upperValue)
Create a range query for half-float values.
|
static Query |
FloatPoint.newRangeQuery(java.lang.String field,
float lowerValue,
float upperValue)
Create a range query for float values.
|
static Query |
InetAddressPoint.newRangeQuery(java.lang.String field,
java.net.InetAddress lowerValue,
java.net.InetAddress upperValue)
Create a range query for network addresses.
|
static Query |
IntPoint.newRangeQuery(java.lang.String field,
int[] lowerValue,
int[] upperValue)
Create a range query for n-dimensional integer values.
|
static Query |
IntPoint.newRangeQuery(java.lang.String field,
int lowerValue,
int upperValue)
Create a range query for integer values.
|
static Query |
LongPoint.newRangeQuery(java.lang.String field,
long[] lowerValue,
long[] upperValue)
Create a range query for n-dimensional long values.
|
static Query |
LongPoint.newRangeQuery(java.lang.String field,
long lowerValue,
long upperValue)
Create a range query for long values.
|
static Query |
FeatureField.newSaturationQuery(java.lang.String fieldName,
java.lang.String featureName)
Same as
FeatureField.newSaturationQuery(String, String, float, float) but
1f is used as a weight and a reasonably good default pivot value
is computed based on index statistics and is approximately equal to the
geometric mean of all values that exist in the index. |
static Query |
FeatureField.newSaturationQuery(java.lang.String fieldName,
java.lang.String featureName,
float weight,
float pivot)
Return a new
Query that will score documents as
weight * S / (S + pivot) where S is the value of the static feature. |
static Query |
BigIntegerPoint.newSetQuery(java.lang.String field,
java.math.BigInteger... values)
Create a query matching any of the specified 1D values.
|
static Query |
BinaryPoint.newSetQuery(java.lang.String field,
byte[]... values)
Create a query matching any of the specified 1D values.
|
static Query |
DoublePoint.newSetQuery(java.lang.String field,
java.util.Collection<java.lang.Double> values)
Create a query matching any of the specified 1D values.
|
static Query |
HalfFloatPoint.newSetQuery(java.lang.String field,
java.util.Collection<java.lang.Float> values)
Create a query matching any of the specified 1D values.
|
static Query |
FloatPoint.newSetQuery(java.lang.String field,
java.util.Collection<java.lang.Float> values)
Create a query matching any of the specified 1D values.
|
static Query |
IntPoint.newSetQuery(java.lang.String field,
java.util.Collection<java.lang.Integer> values)
Create a query matching any of the specified 1D values.
|
static Query |
LongPoint.newSetQuery(java.lang.String field,
java.util.Collection<java.lang.Long> values)
Create a query matching any of the specified 1D values.
|
static Query |
DoublePoint.newSetQuery(java.lang.String field,
double... values)
Create a query matching any of the specified 1D values.
|
static Query |
HalfFloatPoint.newSetQuery(java.lang.String field,
float... values)
Create a query matching any of the specified 1D values.
|
static Query |
FloatPoint.newSetQuery(java.lang.String field,
float... values)
Create a query matching any of the specified 1D values.
|
static Query |
InetAddressPoint.newSetQuery(java.lang.String field,
java.net.InetAddress... values)
Create a query matching any of the specified 1D values.
|
static Query |
IntPoint.newSetQuery(java.lang.String field,
int... values)
Create a query matching any of the specified 1D values.
|
static Query |
LongPoint.newSetQuery(java.lang.String field,
long... values)
Create a query matching any of the specified 1D values.
|
static Query |
FeatureField.newSigmoidQuery(java.lang.String fieldName,
java.lang.String featureName,
float weight,
float pivot,
float exp)
Return a new
Query that will score documents as
weight * S^a / (S^a + pivot^a) where S is the value of the static feature. |
static Query |
LatLonDocValuesField.newSlowBoxQuery(java.lang.String field,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
Create a query for matching a bounding box using doc values.
|
static Query |
LatLonDocValuesField.newSlowDistanceQuery(java.lang.String field,
double latitude,
double longitude,
double radiusMeters)
Create a query for matching points within the specified distance of the supplied location.
|
static Query |
SortedDocValuesField.newSlowExactQuery(java.lang.String field,
BytesRef value)
Create a query for matching an exact
BytesRef value. |
static Query |
SortedSetDocValuesField.newSlowExactQuery(java.lang.String field,
BytesRef value)
Create a query for matching an exact
BytesRef value. |
static Query |
SortedNumericDocValuesField.newSlowExactQuery(java.lang.String field,
long value)
Create a query for matching an exact long value.
|
static Query |
NumericDocValuesField.newSlowExactQuery(java.lang.String field,
long value)
Create a query for matching an exact long value.
|
static Query |
SortedDocValuesField.newSlowRangeQuery(java.lang.String field,
BytesRef lowerValue,
BytesRef upperValue,
boolean lowerInclusive,
boolean upperInclusive)
Create a range query that matches all documents whose value is between
lowerValue and upperValue included. |
static Query |
SortedSetDocValuesField.newSlowRangeQuery(java.lang.String field,
BytesRef lowerValue,
BytesRef upperValue,
boolean lowerInclusive,
boolean upperInclusive)
Create a range query that matches all documents whose value is between
lowerValue and upperValue . |
static Query |
SortedNumericDocValuesField.newSlowRangeQuery(java.lang.String field,
long lowerValue,
long upperValue)
Create a range query that matches all documents whose value is between
lowerValue and upperValue included. |
static Query |
NumericDocValuesField.newSlowRangeQuery(java.lang.String field,
long lowerValue,
long upperValue)
Create a range query that matches all documents whose value is between
lowerValue and upperValue included. |
static Query |
DoubleRange.newWithinQuery(java.lang.String field,
double[] min,
double[] max)
Create a query for matching indexed ranges that are within the defined range.
|
static Query |
LatLonBoundingBox.newWithinQuery(java.lang.String field,
double minLat,
double minLon,
double maxLat,
double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that are within the defined
2d bounding box
|
static Query |
FloatRange.newWithinQuery(java.lang.String field,
float[] min,
float[] max)
Create a query for matching indexed ranges that are within the defined range.
|
static Query |
InetAddressRange.newWithinQuery(java.lang.String field,
java.net.InetAddress min,
java.net.InetAddress max)
Create a query for matching indexed ip ranges that are
WITHIN the defined range. |
static Query |
IntRange.newWithinQuery(java.lang.String field,
int[] min,
int[] max)
Create a query for matching indexed ranges that are within the defined range.
|
static Query |
LongRange.newWithinQuery(java.lang.String field,
long[] min,
long[] max)
Create a query for matching indexed ranges that are within the defined range.
|
Modifier and Type | Method and Description |
---|---|
long |
IndexWriter.deleteDocuments(Query... queries)
Deletes the document(s) matching any of the provided queries.
|
Constructor and Description |
---|
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Query docsInFirstIndex)
Split an index based on a
Query . |
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Query docsInFirstIndex,
IndexWriterConfig config1,
IndexWriterConfig config2) |
Constructor and Description |
---|
SoftDeletesRetentionMergePolicy(java.lang.String field,
java.util.function.Supplier<Query> retentionQuerySupplier,
MergePolicy in)
Creates a new
SoftDeletesRetentionMergePolicy |
Modifier and Type | Method and Description |
---|---|
float |
MemoryIndex.search(Query query)
Convenience method that efficiently returns the relevance score by
matching this index against the given Lucene query expression.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<byte[]> |
PayloadSpanUtil.getPayloadsForQuery(Query query)
Query should be rewritten for wild/fuzzy support.
|
Modifier and Type | Class and Description |
---|---|
class |
BoostingQuery
Deprecated.
|
class |
CommonTermsQuery
A query that executes high-frequency terms in a optional sub-query to prevent
slow queries due to "common" terms like stopwords.
|
class |
CustomScoreQuery
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected Query |
CommonTermsQuery.buildQuery(int maxDoc,
TermContext[] contextArray,
Term[] queryTerms) |
Query |
BoostingQuery.getContext()
Deprecated.
|
Query |
BoostingQuery.getMatch()
Deprecated.
|
Query[] |
CustomScoreQuery.getScoringQueries()
Deprecated.
The scoring queries that only affect the score of CustomScoreQuery.
|
Query |
CustomScoreQuery.getSubQuery()
Deprecated.
The sub-query that CustomScoreQuery wraps, affecting both the score and which documents match.
|
protected Query |
CommonTermsQuery.newTermQuery(Term term,
TermContext context)
Builds a new TermQuery instance.
|
Query |
CustomScoreQuery.rewrite(IndexReader reader)
Deprecated.
|
Query |
BoostingQuery.rewrite(IndexReader reader)
Deprecated.
|
Query |
CommonTermsQuery.rewrite(IndexReader reader) |
Constructor and Description |
---|
BoostingQuery(Query match,
Query context,
float boost)
Deprecated.
|
CustomScoreQuery(Query subQuery)
Deprecated.
Create a CustomScoreQuery over input subQuery.
|
CustomScoreQuery(Query subQuery,
FunctionQuery... scoringQueries)
Deprecated.
Create a CustomScoreQuery over input subQuery and a
FunctionQuery . |
CustomScoreQuery(Query subQuery,
FunctionQuery scoringQuery)
Deprecated.
Create a CustomScoreQuery over input subQuery and a
FunctionQuery . |
Modifier and Type | Class and Description |
---|---|
class |
BoostedQuery
Deprecated.
|
class |
FunctionMatchQuery
A query that retrieves all documents with a
DoubleValues value matching a predicate
This query works by a linear scan of the index, and is best used in
conjunction with other queries that can restrict the number of
documents visited |
class |
FunctionQuery
Returns a score for each document based on a ValueSource,
often some function of the value of a field.
|
class |
FunctionRangeQuery
A Query wrapping a
ValueSource that matches docs in which the values in the value source match a configured
range. |
class |
FunctionScoreQuery
A query that wraps another query, and uses a DoubleValuesSource to
replace or modify the wrapped query's score
If the DoubleValuesSource doesn't return a value for a particular document,
then that document will be given a score of 0.
|
Modifier and Type | Method and Description |
---|---|
Query |
BoostedQuery.getQuery()
Deprecated.
|
Query |
FunctionScoreQuery.getWrappedQuery() |
Query |
BoostedQuery.rewrite(IndexReader reader)
Deprecated.
|
Query |
FunctionScoreQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
static FunctionScoreQuery |
FunctionScoreQuery.boostByQuery(Query in,
Query boostMatch,
float boostValue)
Returns a FunctionScoreQuery where the scores of a wrapped query are multiplied by
a boost factor if the document being scored also matches a separate boosting query.
|
static FunctionScoreQuery |
FunctionScoreQuery.boostByValue(Query in,
DoubleValuesSource boost)
Returns a FunctionScoreQuery where the scores of a wrapped query are multiplied by
the value of a DoubleValuesSource.
|
Constructor and Description |
---|
BoostedQuery(Query subQuery,
ValueSource boostVal)
Deprecated.
|
FunctionScoreQuery(Query in,
DoubleValuesSource source)
Create a new FunctionScoreQuery
|
Modifier and Type | Method and Description |
---|---|
Query |
QueryValueSource.getQuery() |
Constructor and Description |
---|
QueryValueSource(Query q,
float defVal) |
Modifier and Type | Class and Description |
---|---|
class |
MoreLikeThisQuery
A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg
in custom QueryParser extensions.
|
Modifier and Type | Method and Description |
---|---|
Query |
MoreLikeThis.like(int docNum)
Return a query that will return docs like the passed lucene document ID.
|
Query |
MoreLikeThis.like(java.util.Map<java.lang.String,java.util.Collection<java.lang.Object>> filteredDocument) |
Query |
MoreLikeThis.like(java.lang.String fieldName,
java.io.Reader... readers)
Return a query that will return docs like the passed Readers.
|
Query |
MoreLikeThisQuery.rewrite(IndexReader reader) |
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 | Method and Description |
---|---|
Query |
SpanPayloadCheckQuery.rewrite(IndexReader reader) |
Query |
PayloadScoreQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
Query |
QueryParser.Clause(java.lang.String field) |
protected Query |
QueryParserBase.getBooleanQuery(java.util.List<BooleanClause> clauses)
Factory method for generating query, given a set of clauses.
|
protected Query |
MultiFieldQueryParser.getFieldQuery(java.lang.String field,
java.lang.String queryText,
boolean quoted) |
protected Query |
QueryParserBase.getFieldQuery(java.lang.String field,
java.lang.String queryText,
boolean quoted) |
protected Query |
MultiFieldQueryParser.getFieldQuery(java.lang.String field,
java.lang.String queryText,
int slop) |
protected Query |
QueryParserBase.getFieldQuery(java.lang.String field,
java.lang.String queryText,
int slop)
Base implementation delegates to
QueryParserBase.getFieldQuery(String,String,boolean) . |
protected Query |
MultiFieldQueryParser.getFuzzyQuery(java.lang.String field,
java.lang.String termStr,
float minSimilarity) |
protected Query |
QueryParserBase.getFuzzyQuery(java.lang.String field,
java.lang.String termStr,
float minSimilarity)
Factory method for generating a query (similar to
QueryParserBase.getWildcardQuery(java.lang.String, java.lang.String) ). |
protected Query |
MultiFieldQueryParser.getMultiFieldQuery(java.util.List<Query> queries)
Creates a multifield query
|
protected Query |
MultiFieldQueryParser.getPrefixQuery(java.lang.String field,
java.lang.String termStr) |
protected Query |
QueryParserBase.getPrefixQuery(java.lang.String field,
java.lang.String termStr)
Factory method for generating a query (similar to
QueryParserBase.getWildcardQuery(java.lang.String, java.lang.String) ). |
protected Query |
MultiFieldQueryParser.getRangeQuery(java.lang.String field,
java.lang.String part1,
java.lang.String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
QueryParserBase.getRangeQuery(java.lang.String field,
java.lang.String part1,
java.lang.String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
MultiFieldQueryParser.getRegexpQuery(java.lang.String field,
java.lang.String termStr) |
protected Query |
QueryParserBase.getRegexpQuery(java.lang.String field,
java.lang.String termStr)
Factory method for generating a query.
|
protected Query |
MultiFieldQueryParser.getWildcardQuery(java.lang.String field,
java.lang.String termStr) |
protected Query |
QueryParserBase.getWildcardQuery(java.lang.String field,
java.lang.String termStr)
Factory method for generating a query.
|
Query |
QueryParser.MultiTerm(java.lang.String field,
java.util.List<BooleanClause> clauses)
Returns the first query if splitOnWhitespace=true or otherwise the entire produced query
|
protected Query |
QueryParserBase.newFieldQuery(Analyzer analyzer,
java.lang.String field,
java.lang.String queryText,
boolean quoted) |
protected Query |
QueryParserBase.newFuzzyQuery(Term term,
float minimumSimilarity,
int prefixLength)
Builds a new FuzzyQuery instance
|
protected Query |
QueryParserBase.newMatchAllDocsQuery()
Builds a new MatchAllDocsQuery instance
|
protected Query |
QueryParserBase.newPrefixQuery(Term prefix)
Builds a new PrefixQuery instance
|
protected Query |
QueryParserBase.newRangeQuery(java.lang.String field,
java.lang.String part1,
java.lang.String part2,
boolean startInclusive,
boolean endInclusive)
Builds a new
TermRangeQuery instance |
protected Query |
QueryParserBase.newRegexpQuery(Term regexp)
Builds a new RegexpQuery instance
|
protected Query |
QueryParserBase.newWildcardQuery(Term t)
Builds a new WildcardQuery instance
|
Query |
QueryParserBase.parse(java.lang.String query)
Parses a query string, returning a
Query . |
static Query |
MultiFieldQueryParser.parse(java.lang.String[] queries,
java.lang.String[] fields,
Analyzer analyzer)
Parses a query which searches on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(java.lang.String[] queries,
java.lang.String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(java.lang.String query,
java.lang.String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
Query |
QueryParser.Query(java.lang.String field) |
Query |
QueryParser.Term(java.lang.String field) |
Query |
QueryParser.TopLevelQuery(java.lang.String field) |
abstract Query |
QueryParserBase.TopLevelQuery(java.lang.String field) |
Modifier and Type | Method and Description |
---|---|
protected void |
QueryParserBase.addClause(java.util.List<BooleanClause> clauses,
int conj,
int mods,
Query q) |
protected void |
QueryParserBase.addMultiTermClauses(java.util.List<BooleanClause> clauses,
Query q)
Adds clauses generated from analysis over text containing whitespace.
|
protected BooleanClause |
QueryParserBase.newBooleanClause(Query q,
BooleanClause.Occur occur)
Builds a new BooleanClause instance
|
Modifier and Type | Method and Description |
---|---|
protected Query |
MultiFieldQueryParser.getMultiFieldQuery(java.util.List<Query> queries)
Creates a multifield query
|
Modifier and Type | Method and Description |
---|---|
protected Query |
ComplexPhraseQueryParser.getFieldQuery(java.lang.String field,
java.lang.String queryText,
int slop) |
protected Query |
ComplexPhraseQueryParser.getFuzzyQuery(java.lang.String field,
java.lang.String termStr,
float minSimilarity) |
protected Query |
ComplexPhraseQueryParser.getRangeQuery(java.lang.String field,
java.lang.String part1,
java.lang.String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
ComplexPhraseQueryParser.getWildcardQuery(java.lang.String field,
java.lang.String termStr) |
protected Query |
ComplexPhraseQueryParser.newRangeQuery(java.lang.String field,
java.lang.String part1,
java.lang.String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
ComplexPhraseQueryParser.newTermQuery(Term term) |
Query |
ComplexPhraseQueryParser.parse(java.lang.String query) |
Modifier and Type | Method and Description |
---|---|
protected Query |
ExtendableQueryParser.getFieldQuery(java.lang.String field,
java.lang.String queryText,
boolean quoted) |
abstract Query |
ParserExtension.parse(ExtensionQuery query)
Processes the given
ExtensionQuery and returns a corresponding
Query instance. |
Modifier and Type | Method and Description |
---|---|
static Query |
QueryParserUtil.parse(java.lang.String[] queries,
java.lang.String[] fields,
Analyzer analyzer)
Parses a query which searches on the fields specified.
|
static Query |
QueryParserUtil.parse(java.lang.String[] queries,
java.lang.String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
Query |
StandardQueryParser.parse(java.lang.String query,
java.lang.String defaultField)
Overrides
QueryParserHelper.parse(String, String) so it casts the
return object to Query . |
static Query |
QueryParserUtil.parse(java.lang.String query,
java.lang.String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
Modifier and Type | Method and Description |
---|---|
Query |
StandardQueryTreeBuilder.build(QueryNode queryNode) |
Query |
SynonymQueryNodeBuilder.build(QueryNode queryNode) |
Query |
GroupQueryNodeBuilder.build(QueryNode queryNode) |
Query |
StandardQueryBuilder.build(QueryNode queryNode) |
Query |
BoostQueryNodeBuilder.build(QueryNode queryNode) |
Query |
PointRangeQueryNodeBuilder.build(QueryNode queryNode) |
Query |
SlopQueryNodeBuilder.build(QueryNode queryNode) |
Query |
PhraseQueryNodeBuilder.build(QueryNode queryNode) |
Query |
ModifierQueryNodeBuilder.build(QueryNode queryNode) |
Modifier and Type | Method and Description |
---|---|
protected Query |
SimpleQueryParser.newDefaultQuery(java.lang.String text)
Factory method to generate a standard query (no phrase or prefix operators).
|
protected Query |
SimpleQueryParser.newFuzzyQuery(java.lang.String text,
int fuzziness)
Factory method to generate a fuzzy query.
|
protected Query |
SimpleQueryParser.newPhraseQuery(java.lang.String text,
int slop)
Factory method to generate a phrase query with slop.
|
protected Query |
SimpleQueryParser.newPrefixQuery(java.lang.String text)
Factory method to generate a prefix query.
|
Query |
SimpleQueryParser.parse(java.lang.String queryText)
Parses the query text and returns parsed query
|
protected Query |
SimpleQueryParser.simplify(BooleanQuery bq)
Helper to simplify boolean queries with 0 or 1 clause
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Query> |
ComposedQuery.makeLuceneSubQueriesField(java.lang.String fn,
BasicQueryFactory qf) |
Modifier and Type | Method and Description |
---|---|
void |
SpanNearClauseFactory.addSpanQuery(Query q) |
Modifier and Type | Method and Description |
---|---|
Query |
QueryBuilderFactory.getQuery(org.w3c.dom.Element n) |
Query |
QueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
CoreParser.getQuery(org.w3c.dom.Element e) |
Query |
CoreParser.parse(java.io.InputStream xmlStream)
Parses the given stream as XML file and returns a
Query . |
Modifier and Type | Method and Description |
---|---|
Query |
BooleanQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
FuzzyLikeThisQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
PointRangeQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
ConstantScoreQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
MatchAllDocsQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
RangeQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
BoostingQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
SpanQueryBuilderFactory.getQuery(org.w3c.dom.Element e) |
Query |
TermsQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
TermQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
SpanBuilderBase.getQuery(org.w3c.dom.Element e) |
Query |
DisjunctionMaxQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
LikeThisQueryBuilder.getQuery(org.w3c.dom.Element e) |
Query |
UserInputQueryBuilder.getQuery(org.w3c.dom.Element e) |
Modifier and Type | Class and Description |
---|---|
class |
FuzzyLikeThisQuery
Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms.
|
Modifier and Type | Method and Description |
---|---|
Query |
FuzzyLikeThisQuery.rewrite(IndexReader reader) |
Modifier and Type | Class and Description |
---|---|
class |
AutomatonQuery
A
Query that will match terms against a finite-state machine. |
class |
BlendedTermQuery
A
Query that blends index statistics across multiple terms. |
class |
BooleanQuery
A Query that matches documents matching boolean combinations of other
queries, e.g.
|
class |
BoostQuery
A
Query wrapper that allows to give a boost to the wrapped query. |
class |
ConstantScoreQuery
A query that wraps another query and simply returns a constant score equal to
1 for every document that matches the query.
|
class |
CoveringQuery
A
Query that allows to have a configurable number or required
matches per document. |
class |
DisjunctionMaxQuery
A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum
score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.
|
class |
DocValuesFieldExistsQuery
A
Query that matches documents that have a value for a given field
as reported by doc values iterators. |
class |
DocValuesNumbersQuery
Like
DocValuesTermsQuery , but this query only
runs on a long NumericDocValuesField or a
SortedNumericDocValuesField , matching
all documents whose value in the specified field is
contained in the provided set of long values. |
class |
DocValuesTermsQuery
A
Query that only accepts documents whose
term value in the specified field is contained in the
provided set of allowed terms. |
class |
FuzzyQuery
Implements the fuzzy search query.
|
class |
IndexOrDocValuesQuery
A query that uses either an index structure (points or terms) or doc values
in order to run a query, depending which one is more efficient.
|
class |
MatchAllDocsQuery
A query that matches all documents.
|
class |
MatchNoDocsQuery
A query that matches no documents.
|
class |
MultiPhraseQuery
A generalized version of
PhraseQuery , with the possibility of
adding more than one term at the same position that are treated as a disjunction (OR). |
class |
MultiTermQuery
An abstract
Query that matches documents
containing a subset of terms provided by a FilteredTermsEnum enumeration. |
class |
NGramPhraseQuery
This is a
PhraseQuery which is optimized for n-gram phrase query. |
class |
NormsFieldExistsQuery
A
Query that matches documents that have a value for a given field
as reported by field norms. |
class |
PhraseQuery
A Query that matches documents containing a particular sequence of terms.
|
class |
PointInSetQuery
Abstract query class to find all documents whose single or multi-dimensional point values, previously indexed with e.g.
|
class |
PointRangeQuery
Abstract class for range queries against single or multidimensional points such as
IntPoint . |
class |
PrefixQuery
A Query that matches documents containing terms with a specified prefix.
|
class |
RegexpQuery
A fast regular expression query based on the
org.apache.lucene.util.automaton package. |
class |
SynonymQuery
A query that treats multiple terms as synonyms.
|
class |
TermAutomatonQuery
A proximity query that lets you express an automaton, whose
transitions are terms, to match documents.
|
class |
TermInSetQuery
Specialization for a disjunction over many terms that behaves like a
ConstantScoreQuery over a BooleanQuery containing only
BooleanClause.Occur.SHOULD clauses. |
class |
TermQuery
A Query that matches documents containing a term.
|
class |
TermRangeQuery
A Query that matches documents within an range of terms.
|
class |
WildcardQuery
Implements the wildcard search query.
|
Modifier and Type | Field and Description |
---|---|
protected Query |
Weight.parentQuery |
Modifier and Type | Method and Description |
---|---|
protected Query |
MultiTermQuery.TopTermsBlendedFreqScoringRewrite.build(BlendedTermQuery.Builder builder) |
protected Query |
MultiTermQuery.TopTermsScoringBooleanQueryRewrite.build(BooleanQuery.Builder builder) |
protected Query |
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.build(BooleanQuery.Builder builder) |
Query |
IndexOrDocValuesQuery.getIndexQuery()
Return the wrapped query that may be costly to initialize but has a good
iterator.
|
Query |
BoostQuery.getQuery()
Return the wrapped
Query . |
Query |
FilterMatchesIterator.getQuery() |
Query |
MatchesIterator.getQuery()
Returns the Query causing the current match
If this
MatchesIterator has been returned from a MatchesIterator.getSubMatches()
call, then returns a TermQuery equivalent to the current match
Should only be called after MatchesIterator.next() has returned true |
Query |
Weight.getQuery()
The query that this concerns.
|
Query |
BooleanClause.getQuery() |
Query |
ConstantScoreQuery.getQuery()
Returns the encapsulated query.
|
Query |
IndexOrDocValuesQuery.getRandomAccessQuery()
Return the wrapped query that may be slow at identifying all matching
documents, but which is cheap to initialize and can efficiently
verify that some documents match.
|
Query |
CoveringQuery.rewrite(IndexReader reader) |
Query |
TermAutomatonQuery.rewrite(IndexReader reader) |
Query |
MultiTermQuery.rewrite(IndexReader reader)
To rewrite to a simpler form, instead return a simpler
enum from
MultiTermQuery.getTermsEnum(Terms, AttributeSource) . |
Query |
BoostQuery.rewrite(IndexReader reader) |
Query |
DisjunctionMaxQuery.rewrite(IndexReader reader)
Optimize our representation and our subqueries representations
|
Query |
SynonymQuery.rewrite(IndexReader reader) |
Query |
BooleanQuery.rewrite(IndexReader reader) |
Query |
BlendedTermQuery.rewrite(IndexReader reader) |
Query |
IndexOrDocValuesQuery.rewrite(IndexReader reader) |
Query |
NGramPhraseQuery.rewrite(IndexReader reader) |
Query |
PhraseQuery.rewrite(IndexReader reader) |
Query |
Query.rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
Query |
TermInSetQuery.rewrite(IndexReader reader) |
Query |
ConstantScoreQuery.rewrite(IndexReader reader) |
Query |
MultiPhraseQuery.rewrite(IndexReader reader) |
abstract Query |
MultiTermQuery.RewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
TopTermsRewrite.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
ScoringRewrite.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
DocValuesRewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
|
abstract Query |
BlendedTermQuery.RewriteMethod.rewrite(Query[] subQueries)
Merge the provided sub queries into a single
Query object. |
Query |
BlendedTermQuery.DisjunctionMaxRewrite.rewrite(Query[] subQueries) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Query> |
DisjunctionMaxQuery.getDisjuncts() |
java.util.Iterator<Query> |
DisjunctionMaxQuery.iterator() |
Modifier and Type | Method and Description |
---|---|
BooleanQuery.Builder |
BooleanQuery.Builder.add(Query query,
BooleanClause.Occur occur)
Add a new clause to this
BooleanQuery.Builder . |
void |
LRUQueryCache.clearQuery(Query query)
Remove all cache entries for the given query.
|
int |
IndexSearcher.count(Query query)
Count how many documents match the given query.
|
Weight |
IndexSearcher.createNormalizedWeight(Query query,
boolean needsScores)
Deprecated.
Clients should rewrite the query and then call
IndexSearcher.createWeight(Query, boolean, float)
with a boost value of 1f |
Weight |
IndexSearcher.createWeight(Query query,
boolean needsScores,
float boost)
Creates a
Weight for the given query, potentially adding caching
if possible and configured. |
Explanation |
IndexSearcher.explain(Query query,
int doc)
Returns an Explanation that describes how
doc scored against
query . |
static DoubleValuesSource |
DoubleValuesSource.fromQuery(Query query)
Create a DoubleValuesSource that returns the score of a particular query
|
protected int |
UsageTrackingQueryCachingPolicy.minFrequencyToCache(Query query)
For a given filter, return how many times it should appear in the history
before being cached.
|
protected void |
LRUQueryCache.onHit(java.lang.Object readerCoreKey,
Query query)
Expert: callback when there is a cache hit on a given query.
|
protected void |
LRUQueryCache.onMiss(java.lang.Object readerCoreKey,
Query query)
Expert: callback when there is a cache miss on a given query.
|
protected void |
LRUQueryCache.onQueryCache(Query query,
long ramBytesUsed)
Expert: callback when a query is added to this cache.
|
protected void |
LRUQueryCache.onQueryEviction(Query query,
long ramBytesUsed)
Expert: callback when a query is evicted from this cache.
|
void |
UsageTrackingQueryCachingPolicy.onUse(Query query) |
void |
QueryCachingPolicy.onUse(Query query)
Callback that is called every time that a cached filter is used.
|
static TopDocs |
QueryRescorer.rescore(IndexSearcher searcher,
TopDocs topDocs,
Query query,
double weight,
int topN)
Sugar API, calling {#rescore} using a simple linear
combination of firstPassScore + weight * secondPassScore
|
Query |
IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
|
abstract Query |
BlendedTermQuery.RewriteMethod.rewrite(Query[] subQueries)
Merge the provided sub queries into a single
Query object. |
Query |
BlendedTermQuery.DisjunctionMaxRewrite.rewrite(Query[] subQueries) |
void |
IndexSearcher.search(Query query,
Collector results)
Lower-level search API.
|
<C extends Collector,T> |
IndexSearcher.search(Query query,
CollectorManager<C,T> collectorManager)
Lower-level search API.
|
TopDocs |
IndexSearcher.search(Query query,
int n)
Finds the top
n
hits for query . |
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort)
Search implementation with arbitrary sorting.
|
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Search implementation with arbitrary sorting, plus
control over whether hit scores and max score
should be computed.
|
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int numHits)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int n,
Sort sort)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
TopFieldDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int numHits,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Finds the top
n
hits for query where all results are after a previous
result (after ), allowing control over
whether hit scores and max score should be computed. |
boolean |
UsageTrackingQueryCachingPolicy.shouldCache(Query query) |
boolean |
QueryCachingPolicy.shouldCache(Query query)
Whether the given
Query is worth caching. |
Constructor and Description |
---|
BooleanClause(Query query,
BooleanClause.Occur occur)
Constructs a BooleanClause.
|
BoostQuery(Query query,
float boost)
Sole constructor: wrap
query in such a way that the produced
scores will be boosted by boost . |
ConstantScoreQuery(Query query)
Strips off scores from the passed in Query.
|
ConstantScoreWeight(Query query,
float score) |
FilterWeight(Query query,
Weight weight)
Alternative constructor.
|
IndexOrDocValuesQuery(Query indexQuery,
Query dvQuery)
Create an
IndexOrDocValuesQuery . |
QueryRescorer(Query query)
Sole constructor, passing the 2nd pass query to
assign scores to the 1st pass hits.
|
Weight(Query query)
Sole constructor, typically invoked by sub-classes.
|
Constructor and Description |
---|
CoveringQuery(java.util.Collection<Query> queries,
LongValuesSource minimumNumberMatch)
Sole constructor.
|
DisjunctionMaxQuery(java.util.Collection<Query> disjuncts,
float tieBreakerMultiplier)
Creates a new DisjunctionMaxQuery
|
Modifier and Type | Method and Description |
---|---|
protected TopGroups<?> |
GroupingSearch.groupByDocBlock(IndexSearcher searcher,
Query query,
int groupOffset,
int groupLimit) |
protected TopGroups |
GroupingSearch.groupByFieldOrFunction(IndexSearcher searcher,
Query query,
int groupOffset,
int groupLimit) |
<T> TopGroups<T> |
GroupingSearch.search(IndexSearcher searcher,
Query query,
int groupOffset,
int groupLimit)
Executes a grouped search.
|
Constructor and Description |
---|
GroupingSearch(Query groupEndDocs)
Constructor for grouping documents by doc block.
|
Modifier and Type | Method and Description |
---|---|
protected void |
WeightedSpanTermExtractor.extract(Query query,
float boost,
java.util.Map<java.lang.String,WeightedSpanTerm> terms)
|
protected void |
WeightedSpanTermExtractor.extractUnknownQuery(Query query,
java.util.Map<java.lang.String,WeightedSpanTerm> terms) |
protected void |
WeightedSpanTermExtractor.extractWeightedTerms(java.util.Map<java.lang.String,WeightedSpanTerm> terms,
Query query,
float boost)
|
static WeightedTerm[] |
QueryTermExtractor.getIdfWeightedTerms(Query query,
IndexReader reader,
java.lang.String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
static WeightedTerm[] |
QueryTermExtractor.getTerms(Query query)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
static WeightedTerm[] |
QueryTermExtractor.getTerms(Query query,
boolean prohibited)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
static WeightedTerm[] |
QueryTermExtractor.getTerms(Query query,
boolean prohibited,
java.lang.String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
java.util.Map<java.lang.String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTerms(Query query,
float boost,
TokenStream tokenStream)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
java.util.Map<java.lang.String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTerms(Query query,
float boost,
TokenStream tokenStream,
java.lang.String fieldName)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
java.util.Map<java.lang.String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query,
float boost,
TokenStream tokenStream,
java.lang.String fieldName,
IndexReader reader)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
WeightedSpanTermExtractor.isQueryUnsupported(java.lang.Class<? extends Query> clazz) |
Constructor and Description |
---|
QueryScorer(Query query) |
QueryScorer(Query query,
IndexReader reader,
java.lang.String field) |
QueryScorer(Query query,
IndexReader reader,
java.lang.String field,
java.lang.String defaultField) |
QueryScorer(Query query,
java.lang.String field) |
QueryScorer(Query query,
java.lang.String field,
java.lang.String defaultField) |
QueryTermScorer(Query query) |
QueryTermScorer(Query query,
IndexReader reader,
java.lang.String fieldName) |
QueryTermScorer(Query query,
java.lang.String fieldName) |
Modifier and Type | Class and Description |
---|---|
class |
IntervalQuery
A query that retrieves documents containing intervals returned from an
IntervalsSource
Static constructor functions for various different sources can be found in the
Intervals class |
Modifier and Type | Class and Description |
---|---|
class |
ParentChildrenBlockJoinQuery
A query that returns all the matching child documents for a specific parent document
indexed together in the same block.
|
class |
ToChildBlockJoinQuery
Just like
ToParentBlockJoinQuery , except this
query joins in reverse: you provide a Query matching
parent documents and it joins down to child
documents. |
class |
ToParentBlockJoinQuery
This query requires that you index
children and parent docs as a single block, using the
IndexWriter.addDocuments() or IndexWriter.updateDocuments() API. |
Modifier and Type | Method and Description |
---|---|
static Query |
JoinUtil.createJoinQuery(java.lang.String fromField,
boolean multipleValuesPerDocument,
java.lang.String toField,
java.lang.Class<? extends java.lang.Number> numericType,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining for numeric fields.
|
static Query |
JoinUtil.createJoinQuery(java.lang.String fromField,
boolean multipleValuesPerDocument,
java.lang.String toField,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining.
|
static Query |
JoinUtil.createJoinQuery(java.lang.String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
OrdinalMap ordinalMap)
Delegates to
JoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, OrdinalMap, int, int) ,
but disables the min and max filtering. |
static Query |
JoinUtil.createJoinQuery(java.lang.String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
OrdinalMap ordinalMap,
int min,
int max)
A query time join using global ordinals over a dedicated join field.
|
Query |
ToParentBlockJoinQuery.getChildQuery()
Return our child query.
|
Query |
ToChildBlockJoinQuery.getParentQuery()
Return our parent query.
|
Query |
QueryBitSetProducer.getQuery()
Gets the contained query.
|
Query |
ToParentBlockJoinQuery.rewrite(IndexReader reader) |
Query |
ParentChildrenBlockJoinQuery.rewrite(IndexReader reader) |
Query |
ToChildBlockJoinQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
static Query |
JoinUtil.createJoinQuery(java.lang.String fromField,
boolean multipleValuesPerDocument,
java.lang.String toField,
java.lang.Class<? extends java.lang.Number> numericType,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining for numeric fields.
|
static Query |
JoinUtil.createJoinQuery(java.lang.String fromField,
boolean multipleValuesPerDocument,
java.lang.String toField,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining.
|
static Query |
JoinUtil.createJoinQuery(java.lang.String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
OrdinalMap ordinalMap)
Delegates to
JoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, OrdinalMap, int, int) ,
but disables the min and max filtering. |
static Query |
JoinUtil.createJoinQuery(java.lang.String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
OrdinalMap ordinalMap,
int min,
int max)
A query time join using global ordinals over a dedicated join field.
|
Constructor and Description |
---|
ParentChildrenBlockJoinQuery(BitSetProducer parentFilter,
Query childQuery,
int parentDocId)
Creates a
ParentChildrenBlockJoinQuery instance |
QueryBitSetProducer(Query query)
Wraps another query's result and caches it into bitsets.
|
ToChildBlockJoinQuery(Query parentQuery,
BitSetProducer parentsFilter)
Create a ToChildBlockJoinQuery.
|
ToParentBlockJoinQuery(Query childQuery,
BitSetProducer parentsFilter,
ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.
|
Modifier and Type | Class and Description |
---|---|
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 |
SpanQuery
Base class for span-based queries.
|
class |
SpanTermQuery
Matches spans containing a term.
|
class |
SpanWithinQuery
Keep matches that are contained within another Spans.
|
Modifier and Type | Method and Description |
---|---|
Query |
SpanMultiTermQueryWrapper.getWrappedQuery()
Returns the wrapped query
|
Query |
SpanMultiTermQueryWrapper.rewrite(IndexReader reader) |
Query |
SpanPositionCheckQuery.rewrite(IndexReader reader) |
Query |
SpanBoostQuery.rewrite(IndexReader reader) |
Query |
SpanOrQuery.rewrite(IndexReader reader) |
Query |
FieldMaskingSpanQuery.rewrite(IndexReader reader) |
Query |
SpanNotQuery.rewrite(IndexReader reader) |
Query |
SpanNearQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
Query |
UHComponents.getQuery() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<Query> |
UnifiedHighlighter.preMultiTermQueryRewrite(Query query)
When dealing with multi term queries / span queries, we may need to handle custom queries that aren't supported
by the default automata extraction in
MultiTermHighlighting . |
protected java.util.Collection<Query> |
UnifiedHighlighter.preSpanQueryRewrite(Query query)
When highlighting phrases accurately, we may need to handle custom queries that aren't supported in the
WeightedSpanTermExtractor as called by the PhraseHelper . |
Modifier and Type | Method and Description |
---|---|
protected static java.util.Set<Term> |
UnifiedHighlighter.extractTerms(Query query)
Calls
Weight.extractTerms(Set) on an empty index for the query. |
protected CharacterRunAutomaton[] |
UnifiedHighlighter.getAutomata(java.lang.String field,
Query query,
java.util.Set<UnifiedHighlighter.HighlightFlag> highlightFlags) |
protected FieldHighlighter |
UnifiedHighlighter.getFieldHighlighter(java.lang.String field,
Query query,
java.util.Set<Term> allTerms,
int maxPassages) |
protected PhraseHelper |
UnifiedHighlighter.getPhraseHelper(java.lang.String field,
Query query,
java.util.Set<UnifiedHighlighter.HighlightFlag> highlightFlags) |
java.lang.String[] |
UnifiedHighlighter.highlight(java.lang.String field,
Query query,
TopDocs topDocs)
Highlights the top passages from a single field.
|
java.lang.String[] |
UnifiedHighlighter.highlight(java.lang.String field,
Query query,
TopDocs topDocs,
int maxPassages)
Highlights the top-N passages from a single field.
|
java.util.Map<java.lang.String,java.lang.String[]> |
UnifiedHighlighter.highlightFields(java.lang.String[] fieldsIn,
Query query,
int[] docidsIn,
int[] maxPassagesIn)
Highlights the top-N passages from multiple fields,
for the provided int[] docids.
|
java.util.Map<java.lang.String,java.lang.String[]> |
UnifiedHighlighter.highlightFields(java.lang.String[] fields,
Query query,
TopDocs topDocs)
Highlights the top passages from multiple fields.
|
java.util.Map<java.lang.String,java.lang.String[]> |
UnifiedHighlighter.highlightFields(java.lang.String[] fields,
Query query,
TopDocs topDocs,
int[] maxPassages)
Highlights the top-N passages from multiple fields.
|
protected java.util.Map<java.lang.String,java.lang.Object[]> |
UnifiedHighlighter.highlightFieldsAsObjects(java.lang.String[] fieldsIn,
Query query,
int[] docIdsIn,
int[] maxPassagesIn)
Expert: highlights the top-N passages from multiple fields,
for the provided int[] docids, to custom Object as
returned by the
PassageFormatter . |
java.lang.Object |
UnifiedHighlighter.highlightWithoutSearcher(java.lang.String field,
Query query,
java.lang.String content,
int maxPassages)
Highlights text passed as a parameter.
|
protected java.util.Collection<Query> |
UnifiedHighlighter.preMultiTermQueryRewrite(Query query)
When dealing with multi term queries / span queries, we may need to handle custom queries that aren't supported
by the default automata extraction in
MultiTermHighlighting . |
protected java.util.Collection<Query> |
UnifiedHighlighter.preSpanQueryRewrite(Query query)
When highlighting phrases accurately, we may need to handle custom queries that aren't supported in the
WeightedSpanTermExtractor as called by the PhraseHelper . |
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.
|
UHComponents(java.lang.String field,
java.util.function.Predicate<java.lang.String> fieldMatcher,
Query query,
BytesRef[] terms,
PhraseHelper phraseHelper,
CharacterRunAutomaton[] automata,
java.util.Set<UnifiedHighlighter.HighlightFlag> highlightFlags) |
Constructor and Description |
---|
MemoryIndexOffsetStrategy(UHComponents components,
Analyzer analyzer,
java.util.function.Function<Query,java.util.Collection<Query>> multiTermQueryRewrite) |
MemoryIndexOffsetStrategy(UHComponents components,
Analyzer analyzer,
java.util.function.Function<Query,java.util.Collection<Query>> multiTermQueryRewrite) |
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.
|
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 |
---|---|
FieldQuery |
FastVectorHighlighter.getFieldQuery(Query query)
create a
FieldQuery object. |
FieldQuery |
FastVectorHighlighter.getFieldQuery(Query query,
IndexReader reader)
create a
FieldQuery object. |
Modifier and Type | Method and Description |
---|---|
protected Query |
QueryBuilder.analyzeBoolean(java.lang.String field,
TokenStream stream)
Creates simple boolean query from the cached tokenstream contents
|
protected Query |
QueryBuilder.analyzeGraphBoolean(java.lang.String field,
TokenStream source,
BooleanClause.Occur operator)
Creates a boolean query from a graph token stream.
|
protected Query |
QueryBuilder.analyzeGraphPhrase(TokenStream source,
java.lang.String field,
int phraseSlop)
Creates graph phrase query from the tokenstream contents
|
protected Query |
QueryBuilder.analyzeMultiBoolean(java.lang.String field,
TokenStream stream,
BooleanClause.Occur operator)
Creates complex boolean query from the cached tokenstream contents
|
protected Query |
QueryBuilder.analyzeMultiPhrase(java.lang.String field,
TokenStream stream,
int slop)
Creates complex phrase query from the cached tokenstream contents
|
protected Query |
QueryBuilder.analyzePhrase(java.lang.String field,
TokenStream stream,
int slop)
Creates simple phrase query from the cached tokenstream contents
|
protected Query |
QueryBuilder.analyzeTerm(java.lang.String field,
TokenStream stream)
Creates simple term query from the cached tokenstream contents
|
Query |
QueryBuilder.createBooleanQuery(java.lang.String field,
java.lang.String queryText)
Creates a boolean query from the query text.
|
Query |
QueryBuilder.createBooleanQuery(java.lang.String field,
java.lang.String queryText,
BooleanClause.Occur operator)
Creates a boolean query from the query text.
|
protected Query |
QueryBuilder.createFieldQuery(Analyzer analyzer,
BooleanClause.Occur operator,
java.lang.String field,
java.lang.String queryText,
boolean quoted,
int phraseSlop)
Creates a query from the analysis chain.
|
protected Query |
QueryBuilder.createFieldQuery(TokenStream source,
BooleanClause.Occur operator,
java.lang.String field,
boolean quoted,
int phraseSlop)
Creates a query from a token stream.
|
Query |
QueryBuilder.createMinShouldMatchQuery(java.lang.String field,
java.lang.String queryText,
float fraction)
Creates a minimum-should-match query from the query text.
|
Query |
QueryBuilder.createPhraseQuery(java.lang.String field,
java.lang.String queryText)
Creates a phrase query from the query text.
|
Query |
QueryBuilder.createPhraseQuery(java.lang.String field,
java.lang.String queryText,
int phraseSlop)
Creates a phrase query from the query text.
|
protected Query |
QueryBuilder.newGraphSynonymQuery(java.util.Iterator<Query> queries)
Builds a new GraphQuery for multi-terms synonyms.
|
protected Query |
QueryBuilder.newSynonymQuery(Term[] terms)
Builds a new SynonymQuery instance.
|
protected Query |
QueryBuilder.newTermQuery(Term term)
Builds a new TermQuery instance.
|
Modifier and Type | Method and Description |
---|---|
protected Query |
QueryBuilder.newGraphSynonymQuery(java.util.Iterator<Query> queries)
Builds a new GraphQuery for multi-terms synonyms.
|
Copyright © 2000–2022 The Apache Software Foundation. All rights reserved.