Uses of Class
org.apache.lucene.search.Query
Packages that use Query
Package
Description
Uses already seen data (the indexed documents) to classify an input ( can be simple text or a
structured document).
Uses already seen data (the indexed documents) to classify new documents.
Utilities for evaluation, data preparation, etc.
The logical representation of a
Document
for indexing and
searching.Code to maintain and access indices.
High-performance single-document main memory Apache Lucene fulltext search index.
Misc index tools and index support.
Monitoring framework
Experimental classes for interacting with payloads
Filters and Queries that add to core Lucene.
Queries that compute score based upon a function.
A variety of functions to use with FunctionQuery.
Intervals queries
Document similarity query generators.
The payloads package provides Query mechanisms for finding and using payloads.
The calculus of spans.
A simple query parser implemented with JavaCC.
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
Extendable QueryParser provides a simple and flexible extension mechanism by overloading query
field names.
Lucene Flexible Query Parser Implementation
Standard Lucene Query Node Builders.
Standard Lucene Query Nodes.
A simple query parser for human-entered queries.
This package contains SrndQuery and its subclasses.
Parser that produces Lucene Query objects from XML streams.
XML Parser factories for different Lucene Query/Filters.
This package contains several point types:
BigIntegerPoint
for 128-bit
integers
LatLonPoint
for latitude/longitude
geospatial points
Additional queries (some may have caveats or limitations)
This package contains a flexible graph-based proximity query, TermAutomatonQuery, and geospatial
queries.
Code to search indices.
Grouping.
Highlighting search terms.
Support for index-time and query-time joins.
This package contains several components useful to build a highlighter on top of the
Matches
API.Analyzer based autosuggest.
Support for document suggestion
The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term
vectors, or analysis.
Another highlighter implementation based on term vectors.
Lucene field & query support for the spatial geometry implemented in
org.apache.lucene.spatial3d.geom
.Some utility classes.
Finite-state automaton for regular expressions.
-
Uses of Query in org.apache.lucene.classification
Fields in org.apache.lucene.classification declared as QueryModifier and TypeFieldDescriptionprivate final Query
BM25NBClassifier.query
Query
used to eventually filter the document set to be used to classifyprivate final Query
KNearestFuzzyClassifier.query
aQuery
used to filter the documents that should be used from this classifier's underlyingLeafReader
protected final Query
KNearestNeighborClassifier.query
aQuery
used to filter the documents that should be used from this classifier's underlyingLeafReader
protected final Query
SimpleNaiveBayesClassifier.query
Query
used to eventually filter the document set to be used to classifyConstructors in org.apache.lucene.classification with parameters of type QueryModifierConstructorDescriptionBM25NBClassifier
(IndexReader indexReader, Analyzer analyzer, Query query, String classFieldName, String... textFieldNames) Creates a new NaiveBayes classifier.BooleanPerceptronClassifier
(IndexReader indexReader, Analyzer analyzer, Query query, Integer batchSize, Double bias, String classFieldName, String textFieldName) Creates aBooleanPerceptronClassifier
CachingNaiveBayesClassifier
(IndexReader indexReader, Analyzer analyzer, Query query, String classFieldName, String... textFieldNames) Creates a new NaiveBayes classifier with inside caching.KNearestFuzzyClassifier
(IndexReader indexReader, Similarity similarity, Analyzer analyzer, Query query, int k, String classFieldName, String... textFieldNames) Creates aKNearestFuzzyClassifier
.KNearestNeighborClassifier
(IndexReader indexReader, Similarity similarity, Analyzer analyzer, Query query, int k, int minDocsFreq, int minTermFreq, String classFieldName, String... textFieldNames) Creates aKNearestNeighborClassifier
.SimpleNaiveBayesClassifier
(IndexReader indexReader, Analyzer analyzer, Query query, String classFieldName, String... textFieldNames) Creates a new NaiveBayes classifier. -
Uses of Query in org.apache.lucene.classification.document
Constructors in org.apache.lucene.classification.document with parameters of type QueryModifierConstructorDescriptionKNearestNeighborDocumentClassifier
(IndexReader indexReader, Similarity similarity, Query query, int k, int minDocsFreq, int minTermFreq, String classFieldName, Map<String, Analyzer> field2analyzer, String... textFieldNames) Creates aKNearestNeighborClassifier
.SimpleNaiveBayesDocumentClassifier
(IndexReader indexReader, Query query, String classFieldName, Map<String, Analyzer> field2analyzer, String... textFieldNames) Creates a new NaiveBayes classifier. -
Uses of Query in org.apache.lucene.classification.utils
Subclasses of Query in org.apache.lucene.classification.utilsModifier and TypeClassDescriptionclass
Simplification of FuzzyLikeThisQuery, to be used in the context of KNN classification.Methods in org.apache.lucene.classification.utils that return QueryModifier and TypeMethodDescriptionprivate Query
NearestFuzzyQuery.newTermQuery
(IndexReader reader, Term term) NearestFuzzyQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.document
Subclasses of Query in org.apache.lucene.documentModifier and TypeClassDescription(package private) class
(package private) class
(package private) final class
(package private) class
(package private) class
(package private) final class
Distance query forLatLonDocValuesField
.(package private) class
Finds all previously indexed geo points that comply the givenShapeField.QueryRelation
with the specified array ofLatLonGeometry
.(package private) final class
(package private) final class
Distance query forLatLonPoint
.(package private) final class
Finds all previously indexed geo points that comply the givenShapeField.QueryRelation
with the specified array ofLatLonGeometry
.(package private) final class
Finds all previously indexed geo shapes that intersect the specified bounding box.(package private) final class
Finds all previously indexed geo shapes that comply the givenShapeField.QueryRelation
with the specified array ofLatLonGeometry
.(package private) final class
(package private) class
class
Query class for searchingRangeField
types by a definedPointValues.Relation
.(package private) class
(package private) class
(package private) class
class
XYGeometry query forXYDocValuesField
.(package private) final class
Finds all previously indexed points that fall within the specified XY geometries.(package private) final class
Finds all previously indexed cartesian shapes that comply the givenShapeField.QueryRelation
with the specified array ofXYGeometry
.Methods in org.apache.lucene.document that return QueryModifier and TypeMethodDescriptionprivate static Query
LatLonPoint.makeContainsGeometryQuery
(String field, LatLonGeometry... latLonGeometries) private static Query
LatLonShape.makeContainsGeometryQuery
(String field, LatLonGeometry... latLonGeometries) private static Query
LatLonPoint.newBoxInternal
(String field, byte[] min, byte[] max) static Query
LatLonPoint.newBoxQuery
(String field, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) Create a query for matching a bounding box.static Query
LatLonShape.newBoxQuery
(String field, ShapeField.QueryRelation queryRelation, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) create a query to find all indexed geo shapes that intersect a defined bounding box *static Query
XYPointField.newBoxQuery
(String field, float minX, float maxX, float minY, float maxY) Create a query for matching a bounding box.static Query
XYShape.newBoxQuery
(String field, ShapeField.QueryRelation queryRelation, float minX, float maxX, float minY, float maxY) create a query to find all cartesian shapes that intersect a defined bounding box *static Query
DoubleRange.newContainsQuery
(String field, double[] min, double[] max) Create a query for matching indexed ranges that contain the defined range.static Query
FloatRange.newContainsQuery
(String field, float[] min, float[] max) Create a query for matching indexed float ranges that contain the defined range.static Query
InetAddressRange.newContainsQuery
(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges thatCONTAINS
the defined range.static Query
IntRange.newContainsQuery
(String field, int[] min, int[] max) Create a query for matching indexed ranges that contain the defined range.static Query
LongRange.newContainsQuery
(String field, long[] min, long[] max) Create a query for matching indexed ranges that contain the defined range.static Query
DoubleRange.newCrossesQuery
(String field, double[] min, double[] max) Create a query for matching indexed ranges that cross the defined range.static Query
FloatRange.newCrossesQuery
(String field, float[] min, float[] max) Create a query for matching indexed ranges that cross the defined range.static Query
InetAddressRange.newCrossesQuery
(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges thatCROSS
the defined range.static Query
IntRange.newCrossesQuery
(String field, int[] min, int[] max) Create a query for matching indexed ranges that cross the defined range.static Query
LongRange.newCrossesQuery
(String field, long[] min, long[] max) Create a query for matching indexed ranges that cross the defined range.static Query
LatLonPoint.newDistanceFeatureQuery
(String field, float weight, double originLat, double originLon, double pivotDistanceMeters) Given a field that indexes point values into aLatLonPoint
and doc values intoLatLonDocValuesField
, this returns a query that scores documents based on their haversine distance in meters to(originLat, originLon)
:score = weight * pivotDistanceMeters / (pivotDistanceMeters + distance)
, ie.static Query
LongPoint.newDistanceFeatureQuery
(String field, float weight, long origin, long pivotDistance) Given a field that indexes the same long values into aLongPoint
and doc values (eitherNumericDocValuesField
orSortedNumericDocValuesField
), this returns a query that scores documents based on their distance toorigin
:score = weight * pivotDistance / (pivotDistance + distance)
, ie.static Query
LatLonPoint.newDistanceQuery
(String field, double latitude, double longitude, double radiusMeters) Create a query for matching points within the specified distance of the supplied location.static Query
LatLonShape.newDistanceQuery
(String field, ShapeField.QueryRelation queryRelation, Circle... circle) create a query to find all polygons that intersect a provided circle.static Query
XYPointField.newDistanceQuery
(String field, float x, float y, float radius) Create a query for matching points within the specified distance of the supplied location.static Query
XYShape.newDistanceQuery
(String field, ShapeField.QueryRelation queryRelation, XYCircle... circle) create a query to find all cartesian shapes that intersect a provided circle (or arrays of circles) *static Query
BinaryPoint.newExactQuery
(String field, byte[] value) Create a query for matching an exact binary value.static Query
DoublePoint.newExactQuery
(String field, double value) Create a query for matching an exact double value.static Query
FloatPoint.newExactQuery
(String field, float value) Create a query for matching an exact float value.static Query
InetAddressPoint.newExactQuery
(String field, InetAddress value) Create a query for matching a network address.static Query
IntPoint.newExactQuery
(String field, int value) Create a query for matching an exact integer value.static Query
LongPoint.newExactQuery
(String field, long value) Create a query for matching an exact long value.static Query
LatLonPoint.newGeometryQuery
(String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries) Create a query for matching one or more geometries against the providedShapeField.QueryRelation
.static Query
LatLonShape.newGeometryQuery
(String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries) create a query to find all indexed geo shapes that intersect a provided geometry (or array of geometries).static Query
XYPointField.newGeometryQuery
(String field, XYGeometry... xyGeometries) create a query to find all indexed shapes that intersect a provided geometry collection.static Query
XYShape.newGeometryQuery
(String field, ShapeField.QueryRelation queryRelation, XYGeometry... xyGeometries) create a query to find all indexed geo shapes that intersect a provided geometry collection note: Components do not support dateline crossingstatic Query
DoubleRange.newIntersectsQuery
(String field, double[] min, double[] max) Create a query for matching indexed ranges that intersect the defined range.static Query
FloatRange.newIntersectsQuery
(String field, float[] min, float[] max) Create a query for matching indexed ranges that intersect the defined range.static Query
InetAddressRange.newIntersectsQuery
(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges thatINTERSECT
the defined range.static Query
IntRange.newIntersectsQuery
(String field, int[] min, int[] max) Create a query for matching indexed ranges that intersect the defined range.static Query
LongRange.newIntersectsQuery
(String field, long[] min, long[] max) Create a query for matching indexed ranges that intersect the defined range.static Query
FeatureField.newLinearQuery
(String fieldName, String featureName, float weight) Return a newQuery
that will score documents asweight * S
where S is the value of the static feature.static Query
LatLonShape.newLineQuery
(String field, ShapeField.QueryRelation queryRelation, Line... lines) create a query to find all indexed geo shapes that intersect a provided linestring (or array of linestrings) note: does not support dateline crossingstatic Query
XYShape.newLineQuery
(String field, ShapeField.QueryRelation queryRelation, XYLine... lines) create a query to find all cartesian shapes that intersect a provided linestring (or array of linestrings) *static Query
FeatureField.newLogQuery
(String fieldName, String featureName, float weight, float scalingFactor) Return a newQuery
that will score documents asweight * Math.log(scalingFactor + S)
where S is the value of the static feature.static Query
LatLonShape.newPointQuery
(String field, ShapeField.QueryRelation queryRelation, double[]... points) create a query to find all indexed shapes that comply theShapeField.QueryRelation
with the provided pointsstatic Query
XYShape.newPointQuery
(String field, ShapeField.QueryRelation queryRelation, float[]... points) create a query to find all indexed shapes that comply theShapeField.QueryRelation
with the provided pointstatic Query
LatLonPoint.newPolygonQuery
(String field, Polygon... polygons) Create a query for matching one or more polygons.static Query
LatLonShape.newPolygonQuery
(String field, ShapeField.QueryRelation queryRelation, Polygon... polygons) create a query to find all indexed geo shapes that intersect a provided polygon (or array of polygons) note: does not support dateline crossingstatic Query
XYPointField.newPolygonQuery
(String field, XYPolygon... polygons) Create a query for matching one or more polygons.static Query
XYShape.newPolygonQuery
(String field, ShapeField.QueryRelation queryRelation, XYPolygon... polygons) create a query to find all cartesian shapes that intersect a provided polygon (or array of polygons) *static Query
InetAddressPoint.newPrefixQuery
(String field, InetAddress value, int prefixLength) Create a prefix query for matching a CIDR network range.static Query
BinaryPoint.newRangeQuery
(String field, byte[][] lowerValue, byte[][] upperValue) Create a range query for n-dimensional binary values.static Query
BinaryPoint.newRangeQuery
(String field, byte[] lowerValue, byte[] upperValue) Create a range query for binary values.static Query
DoublePoint.newRangeQuery
(String field, double[] lowerValue, double[] upperValue) Create a range query for n-dimensional double values.static Query
DoublePoint.newRangeQuery
(String field, double lowerValue, double upperValue) Create a range query for double values.static Query
FloatPoint.newRangeQuery
(String field, float[] lowerValue, float[] upperValue) Create a range query for n-dimensional float values.static Query
FloatPoint.newRangeQuery
(String field, float lowerValue, float upperValue) Create a range query for float values.static Query
InetAddressPoint.newRangeQuery
(String field, InetAddress lowerValue, InetAddress upperValue) Create a range query for network addresses.static Query
IntPoint.newRangeQuery
(String field, int[] lowerValue, int[] upperValue) Create a range query for n-dimensional integer values.static Query
IntPoint.newRangeQuery
(String field, int lowerValue, int upperValue) Create a range query for integer values.static Query
LongPoint.newRangeQuery
(String field, long[] lowerValue, long[] upperValue) Create a range query for n-dimensional long values.static Query
LongPoint.newRangeQuery
(String field, long lowerValue, long upperValue) Create a range query for long values.private static Query
DoubleRange.newRelationQuery
(String field, double[] min, double[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static Query
FloatRange.newRelationQuery
(String field, float[] min, float[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static Query
InetAddressRange.newRelationQuery
(String field, InetAddress min, InetAddress max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static Query
IntRange.newRelationQuery
(String field, int[] min, int[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static Query
LongRange.newRelationQuery
(String field, long[] min, long[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational querystatic Query
FeatureField.newSaturationQuery
(String fieldName, String featureName) Same asFeatureField.newSaturationQuery(String, String, float, float)
but1f
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
(String fieldName, String featureName, float weight, float pivot) Return a newQuery
that will score documents asweight * S / (S + pivot)
where S is the value of the static feature.private static Query
FeatureField.newSaturationQuery
(String fieldName, String featureName, float weight, Float pivot) static Query
BinaryPoint.newSetQuery
(String field, byte[]... values) Create a query matching any of the specified 1D values.static Query
DoublePoint.newSetQuery
(String field, double... values) Create a query matching any of the specified 1D values.static Query
DoublePoint.newSetQuery
(String field, Collection<Double> values) Create a query matching any of the specified 1D values.static Query
FloatPoint.newSetQuery
(String field, float... values) Create a query matching any of the specified 1D values.static Query
FloatPoint.newSetQuery
(String field, Collection<Float> values) Create a query matching any of the specified 1D values.static Query
InetAddressPoint.newSetQuery
(String field, InetAddress... values) Create a query matching any of the specified 1D values.static Query
IntPoint.newSetQuery
(String field, int... values) Create a query matching any of the specified 1D values.static Query
IntPoint.newSetQuery
(String field, Collection<Integer> values) Create a query matching any of the specified 1D values.static Query
LongPoint.newSetQuery
(String field, long... values) Create a query matching any of the specified 1D values.static Query
LongPoint.newSetQuery
(String field, Collection<Long> values) Create a query matching any of the specified 1D values.static Query
FeatureField.newSigmoidQuery
(String fieldName, String featureName, float weight, float pivot, float exp) Return a newQuery
that will score documents asweight * S^a / (S^a + pivot^a)
where S is the value of the static feature.static Query
LatLonDocValuesField.newSlowBoxQuery
(String field, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) Create a query for matching a bounding box using doc values.static Query
XYDocValuesField.newSlowBoxQuery
(String field, float minX, float maxX, float minY, float maxY) Create a query for matching a bounding box using doc values.static Query
LatLonDocValuesField.newSlowDistanceQuery
(String field, double latitude, double longitude, double radiusMeters) Create a query for matching points within the specified distance of the supplied location.static Query
XYDocValuesField.newSlowDistanceQuery
(String field, float x, float y, float radius) Create a query for matching points within the specified distance of the supplied location.static Query
NumericDocValuesField.newSlowExactQuery
(String field, long value) Create a query for matching an exact long value.static Query
SortedDocValuesField.newSlowExactQuery
(String field, BytesRef value) Create a query for matching an exactBytesRef
value.static Query
SortedNumericDocValuesField.newSlowExactQuery
(String field, long value) Create a query for matching an exact long value.static Query
SortedSetDocValuesField.newSlowExactQuery
(String field, BytesRef value) Create a query for matching an exactBytesRef
value.static Query
LatLonDocValuesField.newSlowGeometryQuery
(String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries) Create a query for matching one or more geometries against the providedShapeField.QueryRelation
.static Query
XYDocValuesField.newSlowGeometryQuery
(String field, XYGeometry... geometries) Create a query for matching points within the supplied geometries.static Query
DoubleRangeDocValuesField.newSlowIntersectsQuery
(String field, double[] min, double[] max) Create a new range query that finds all ranges that intersect using doc values.static Query
FloatRangeDocValuesField.newSlowIntersectsQuery
(String field, float[] min, float[] max) Create a new range query that finds all ranges that intersect using doc values.static Query
IntRangeDocValuesField.newSlowIntersectsQuery
(String field, int[] min, int[] max) Create a new range query that finds all ranges that intersect using doc values.static Query
LongRangeDocValuesField.newSlowIntersectsQuery
(String field, long[] min, long[] max) Create a new range query that finds all ranges that intersect using doc values.static Query
LatLonDocValuesField.newSlowPolygonQuery
(String field, Polygon... polygons) Create a query for matching points within the supplied polygons.static Query
XYDocValuesField.newSlowPolygonQuery
(String field, XYPolygon... polygons) Create a query for matching points within the supplied polygons.private static Query
DoubleRangeDocValuesField.newSlowRangeQuery
(String field, double[] min, double[] max, RangeFieldQuery.QueryType queryType) private static Query
FloatRangeDocValuesField.newSlowRangeQuery
(String field, float[] min, float[] max, RangeFieldQuery.QueryType queryType) private static Query
IntRangeDocValuesField.newSlowRangeQuery
(String field, int[] min, int[] max, RangeFieldQuery.QueryType queryType) private static Query
LongRangeDocValuesField.newSlowRangeQuery
(String field, long[] min, long[] max, RangeFieldQuery.QueryType queryType) static Query
NumericDocValuesField.newSlowRangeQuery
(String field, long lowerValue, long upperValue) Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
included.static Query
SortedDocValuesField.newSlowRangeQuery
(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive) Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
included.static Query
SortedNumericDocValuesField.newSlowRangeQuery
(String field, long lowerValue, long upperValue) Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
included.static Query
SortedSetDocValuesField.newSlowRangeQuery
(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive) Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
.static Query
DoubleRange.newWithinQuery
(String field, double[] min, double[] max) Create a query for matching indexed ranges that are within the defined range.static Query
FloatRange.newWithinQuery
(String field, float[] min, float[] max) Create a query for matching indexed ranges that are within the defined range.static Query
InetAddressRange.newWithinQuery
(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges that areWITHIN
the defined range.static Query
IntRange.newWithinQuery
(String field, int[] min, int[] max) Create a query for matching indexed ranges that are within the defined range.static Query
LongRange.newWithinQuery
(String field, long[] min, long[] max) Create a query for matching indexed ranges that are within the defined range.BinaryRangeFieldRangeQuery.rewrite
(IndexReader reader) DoubleRangeSlowRangeQuery.rewrite
(IndexReader reader) FeatureQuery.rewrite
(IndexReader reader) FloatRangeSlowRangeQuery.rewrite
(IndexReader reader) IntRangeSlowRangeQuery.rewrite
(IndexReader reader) LongRangeSlowRangeQuery.rewrite
(IndexReader reader) SortedNumericDocValuesRangeQuery.rewrite
(IndexReader reader) SortedSetDocValuesRangeQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.index
Fields in org.apache.lucene.index declared as QueryModifier and TypeFieldDescription(package private) final Query[]
FrozenBufferedUpdates.deleteQueries
Fields in org.apache.lucene.index with type parameters of type QueryModifier and TypeFieldDescriptionBufferedUpdates.deleteQueries
SoftDeletesRetentionMergePolicy.retentionQuerySupplier
Methods in org.apache.lucene.index with parameters of type QueryModifier and TypeMethodDescription(package private) long
void
(package private) static CodecReader
SoftDeletesRetentionMergePolicy.applyRetentionQuery
(String softDeleteField, Query retentionQuery, CodecReader reader) long
IndexWriter.deleteDocuments
(Query... queries) Deletes the document(s) matching any of the provided queries.(package private) long
DocumentsWriter.deleteQueries
(Query... queries) private static Scorer
SoftDeletesRetentionMergePolicy.getScorer
(Query query, CodecReader reader) Constructors in org.apache.lucene.index with parameters of type QueryConstructor parameters in org.apache.lucene.index with type arguments of type QueryModifierConstructorDescriptionSoftDeletesRetentionMergePolicy
(String field, Supplier<Query> retentionQuerySupplier, MergePolicy in) Creates a newSoftDeletesRetentionMergePolicy
-
Uses of Query in org.apache.lucene.index.memory
Methods in org.apache.lucene.index.memory with parameters of type Query -
Uses of Query in org.apache.lucene.misc.index
Fields in org.apache.lucene.misc.index declared as QueryMethods in org.apache.lucene.misc.index with parameters of type QueryModifier and TypeMethodDescriptionprivate void
PKIndexSplitter.createIndex
(IndexWriterConfig config, Directory target, DirectoryReader reader, Query preserveFilter, boolean negateFilter) Constructors in org.apache.lucene.misc.index with parameters of type QueryModifierConstructorDescriptionPKIndexSplitter
(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex) Split an index based on aQuery
.PKIndexSplitter
(Directory input, Directory dir1, Directory dir2, Query docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2) -
Uses of Query in org.apache.lucene.monitor
Subclasses of Query in org.apache.lucene.monitorModifier and TypeClassDescription(package private) class
Query wrapper that forces its wrapped Query to use the default doc-by-doc BulkScorer.Fields in org.apache.lucene.monitor declared as QueryModifier and TypeFieldDescriptionprivate final Query
ForceNoBulkScoringQuery.inner
(package private) final Query
ParallelMatcher.MatcherTask.matchQuery
(package private) final Query
PartitionMatcher.MatchTask.matchQuery
(package private) final Query
QueryCacheEntry.matchQuery
The (possibly partial due to decomposition) queryprivate final Query
MonitorQuery.query
Fields in org.apache.lucene.monitor with type parameters of type QueryModifier and TypeFieldDescriptionprivate final BiFunction<Query,
TermWeightor, QueryTree> QueryAnalyzer.unknownQueryMapper
Methods in org.apache.lucene.monitor that return QueryModifier and TypeMethodDescriptionMultipassTermFilteredPresearcher.MultipassDocumentQueryBuilder.build()
TermFilteredPresearcher.DocumentQueryBuilder.build()
private Query
TermFilteredPresearcher.buildFilterClause
(LeafReader reader, String field) private Query
TermFilteredPresearcher.buildFilterFields
(LeafReader reader) abstract Query
Presearcher.buildQuery
(LeafReader reader, BiPredicate<String, BytesRef> termAcceptor) Build a query for a Monitor's queryindex from a LeafReader over a set of documents to monitor.QueryIndex.QueryBuilder.buildQuery
(BiPredicate<String, BytesRef> termAcceptor) final Query
TermFilteredPresearcher.buildQuery
(LeafReader reader, BiPredicate<String, BytesRef> termAcceptor) MonitorQuery.getQuery()
ForceNoBulkScoringQuery.getWrappedQuery()
ForceNoBulkScoringQuery.rewrite
(IndexReader reader) Methods in org.apache.lucene.monitor that return types with arguments of type QueryModifier and TypeMethodDescriptionprivate static BiFunction<Query,
TermWeightor, QueryTree> QueryAnalyzer.buildMapper
(List<CustomQueryHandler> mappers) Split a query up into individual parts that can be indexed and run separatelyQueryDecomposer.decomposeBoolean
(BooleanQuery q) Decompose aBooleanQuery
QueryDecomposer.decomposeBoostQuery
(BoostQuery q) Methods in org.apache.lucene.monitor with parameters of type QueryModifier and TypeMethodDescription(package private) QueryTree
QueryAnalyzer.buildTree
(Query luceneQuery, TermWeightor weightor) Create aQueryTree
from a passed in Query or Filtervoid
QueryAnalyzer.QueryBuilder.consumeTerms
(Query query, Term... terms) Split a query up into individual parts that can be indexed and run separatelyQueryAnalyzer.QueryBuilder.getSubVisitor
(BooleanClause.Occur occur, Query parent) CustomQueryHandler.handleQuery
(Query query, TermWeightor termWeightor) Builds aQueryTree
node from a queryRegexpQueryHandler.handleQuery
(Query q, TermWeightor termWeightor) abstract Document
Presearcher.indexQuery
(Query query, Map<String, String> metadata) Build a lucene Document to index the query in a Monitor's queryindexfinal Document
TermFilteredPresearcher.indexQuery
(Query query, Map<String, String> metadata) protected abstract void
Runs the supplied query against this CandidateMatcher's set of documents, storing any resulting match, and recording the query in the presearcher hitsprotected void
protected void
protected void
(package private) long
QueryIndex.search
(Query query, QueryIndex.QueryCollector matcher) void
Method parameters in org.apache.lucene.monitor with type arguments of type QueryModifier and TypeMethodDescriptionstatic MonitorQuerySerializer
MonitorQuerySerializer.fromParser
(Function<String, Query> parser) Build a serializer from a query parserConstructors in org.apache.lucene.monitor with parameters of type QueryModifierConstructorDescriptionForceNoBulkScoringQuery
(Query inner) private
private
MonitorQuery
(String id, Query query) Creates a new MonitorQuery with empty metadata and no string representationCreates a new MonitorQueryprivate
-
Uses of Query in org.apache.lucene.payloads
Methods in org.apache.lucene.payloads with parameters of type QueryModifier and TypeMethodDescriptionCollection<byte[]>
PayloadSpanUtil.getPayloadsForQuery
(Query query) Query should be rewritten for wild/fuzzy support.private void
PayloadSpanUtil.queryToSpanQuery
(Query query, Collection<byte[]> payloads) -
Uses of Query in org.apache.lucene.queries
Subclasses of Query in org.apache.lucene.queriesModifier and TypeClassDescriptionclass
A query that executes high-frequency terms in a optional sub-query to prevent slow queries due to "common" terms like stopwords.Methods in org.apache.lucene.queries that return QueryModifier and TypeMethodDescriptionprotected Query
CommonTermsQuery.buildQuery
(int maxDoc, TermStates[] contextArray, Term[] queryTerms) protected Query
CommonTermsQuery.newTermQuery
(Term term, TermStates termStates) Builds a new TermQuery instance.CommonTermsQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.queries.function
Subclasses of Query in org.apache.lucene.queries.functionModifier and TypeClassDescriptionfinal class
A query that retrieves all documents with aDoubleValues
value matching a predicateclass
Returns a score for each document based on a ValueSource, often some function of the value of a field.class
A Query wrapping aValueSource
that matches docs in which the values in the value source match a configured range.final class
A query that wraps another query, and uses a DoubleValuesSource to replace or modify the wrapped query's scoreFields in org.apache.lucene.queries.function declared as QueryMethods in org.apache.lucene.queries.function that return QueryModifier and TypeMethodDescriptionFunctionScoreQuery.getWrappedQuery()
FunctionScoreQuery.rewrite
(IndexReader reader) Methods in org.apache.lucene.queries.function with parameters of type QueryModifier and TypeMethodDescriptionstatic 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.Constructors in org.apache.lucene.queries.function with parameters of type QueryModifierConstructorDescriptionFunctionScoreQuery
(Query in, DoubleValuesSource source) Create a new FunctionScoreQuery(package private)
FunctionScoreWeight
(Query query, Weight inner, DoubleValuesSource valueSource, float boost) -
Uses of Query in org.apache.lucene.queries.function.valuesource
Fields in org.apache.lucene.queries.function.valuesource declared as QueryModifier and TypeFieldDescription(package private) final Query
QueryDocValues.q
(package private) final Query
QueryValueSource.q
Methods in org.apache.lucene.queries.function.valuesource that return QueryConstructors in org.apache.lucene.queries.function.valuesource with parameters of type Query -
Uses of Query in org.apache.lucene.queries.intervals
Subclasses of Query in org.apache.lucene.queries.intervalsModifier and TypeClassDescriptionfinal class
A query that retrieves documents containing intervals returned from anIntervalsSource
Fields in org.apache.lucene.queries.intervals declared as QueryMethods in org.apache.lucene.queries.intervals that return QueryModifier and TypeMethodDescriptionCachingMatchesIterator.getQuery()
ConjunctionMatchesIterator.getQuery()
DisjunctionIntervalsSource.DisjunctionMatchesIterator.getQuery()
MinimumShouldMatchIntervalsSource.MinimumMatchesIterator.getQuery()
RepeatingIntervalsSource.DuplicateMatchesIterator.getQuery()
Constructors in org.apache.lucene.queries.intervals with parameters of type Query -
Uses of Query in org.apache.lucene.queries.mlt
Subclasses of Query in org.apache.lucene.queries.mltModifier and TypeClassDescriptionclass
A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg in custom QueryParser extensions.Methods in org.apache.lucene.queries.mlt that return QueryModifier and TypeMethodDescriptionprivate Query
MoreLikeThis.createQuery
(PriorityQueue<MoreLikeThis.ScoreTerm> q) Create the More like query from a PriorityQueueMoreLikeThis.like
(int docNum) Return a query that will return docs like the passed lucene document ID.Return a query that will return docs like the passed Readers.MoreLikeThis.like
(Map<String, Collection<Object>> filteredDocument) MoreLikeThisQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.queries.payloads
Subclasses of Query in org.apache.lucene.queries.payloadsModifier and TypeClassDescriptionclass
A Query class that uses aPayloadFunction
to modify the score of a wrapped SpanQueryclass
Only return those matches that have a specific payload at the given position.Methods in org.apache.lucene.queries.payloads that return QueryModifier and TypeMethodDescriptionPayloadScoreQuery.rewrite
(IndexReader reader) SpanPayloadCheckQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.queries.spans
Subclasses of Query in org.apache.lucene.queries.spansModifier and TypeClassDescriptionfinal class
Wrapper to allowSpanQuery
objects participate in composite single-field SpanQueries by 'lying' about their search field.final class
Keep matches that contain another SpanScorer.(package private) class
class
Matches spans near the beginning of a field.class
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
Wraps anyMultiTermQuery
as aSpanQuery
, so it can be nested within other SpanQuery classes.class
Matches spans which are near one another.private static class
final class
Removes matches which overlap with another SpanQuery or which are within x tokens before or y tokens after another SpanQuery.final class
Matches the union of its clauses.class
Base class for filtering a SpanQuery based on the position of a match.class
Checks to see if theSpanPositionCheckQuery.getMatch()
lies between a start and end positionclass
Base class for span-based queries.class
Matches spans containing a term.final class
Keep matches that are contained within another Spans.Methods in org.apache.lucene.queries.spans that return QueryModifier and TypeMethodDescriptionSpanMultiTermQueryWrapper.getWrappedQuery()
Returns the wrapped queryFieldMaskingSpanQuery.rewrite
(IndexReader reader) SpanContainQuery.rewrite
(IndexReader reader) SpanMultiTermQueryWrapper.rewrite
(IndexReader reader) SpanNearQuery.rewrite
(IndexReader reader) SpanNotQuery.rewrite
(IndexReader reader) SpanOrQuery.rewrite
(IndexReader reader) SpanPositionCheckQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.queryparser.classic
Methods in org.apache.lucene.queryparser.classic that return QueryModifier and TypeMethodDescriptionprivate Query
final Query
protected Query
QueryParserBase.getBooleanQuery
(List<BooleanClause> clauses) Factory method for generating query, given a set of clauses.protected Query
MultiFieldQueryParser.getFieldQuery
(String field, String queryText, boolean quoted) protected Query
MultiFieldQueryParser.getFieldQuery
(String field, String queryText, int slop) protected Query
QueryParserBase.getFieldQuery
(String field, String queryText, boolean quoted) protected Query
QueryParserBase.getFieldQuery
(String field, String queryText, int slop) Base implementation delegates toQueryParserBase.getFieldQuery(String,String,boolean)
.protected Query
MultiFieldQueryParser.getFuzzyQuery
(String field, String termStr, float minSimilarity) protected Query
QueryParserBase.getFuzzyQuery
(String field, String termStr, float minSimilarity) Factory method for generating a query (similar toQueryParserBase.getWildcardQuery(java.lang.String, java.lang.String)
).protected Query
MultiFieldQueryParser.getMultiFieldQuery
(List<Query> queries) Creates a multifield queryprotected Query
MultiFieldQueryParser.getPrefixQuery
(String field, String termStr) protected Query
QueryParserBase.getPrefixQuery
(String field, String termStr) Factory method for generating a query (similar toQueryParserBase.getWildcardQuery(java.lang.String, java.lang.String)
).protected Query
MultiFieldQueryParser.getRangeQuery
(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected Query
QueryParserBase.getRangeQuery
(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected Query
MultiFieldQueryParser.getRegexpQuery
(String field, String termStr) protected Query
QueryParserBase.getRegexpQuery
(String field, String termStr) Factory method for generating a query.protected Query
MultiFieldQueryParser.getWildcardQuery
(String field, String termStr) protected Query
QueryParserBase.getWildcardQuery
(String field, String termStr) Factory method for generating a query.(package private) Query
QueryParserBase.handleBareFuzzy
(String qfield, Token fuzzySlop, String termImage) (package private) Query
QueryParserBase.handleBareTokenQuery
(String qfield, Token term, Token fuzzySlop, boolean prefix, boolean wildcard, boolean fuzzy, boolean regexp) (package private) Query
QueryParserBase.handleBoost
(Query q, Token boost) (package private) Query
QueryParserBase.handleQuotedTerm
(String qfield, Token term, Token fuzzySlop) final Query
QueryParser.MultiTerm
(String field, List<BooleanClause> clauses) Returns the first query if splitOnWhitespace=true or otherwise the entire produced queryprotected Query
QueryParserBase.newFieldQuery
(Analyzer analyzer, String field, String queryText, boolean quoted) protected Query
QueryParserBase.newFuzzyQuery
(Term term, float minimumSimilarity, int prefixLength) Builds a new FuzzyQuery instanceprotected Query
QueryParserBase.newMatchAllDocsQuery()
Builds a new MatchAllDocsQuery instanceprotected Query
QueryParserBase.newPrefixQuery
(Term prefix) Builds a new PrefixQuery instanceprotected Query
QueryParserBase.newRangeQuery
(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) Builds a newTermRangeQuery
instanceprotected Query
QueryParserBase.newRegexpQuery
(Term regexp) Builds a new RegexpQuery instanceprotected Query
QueryParserBase.newWildcardQuery
(Term t) Builds a new WildcardQuery instancestatic Query
Parses a query which searches on the fields specified.static Query
MultiFieldQueryParser.parse
(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.static Query
MultiFieldQueryParser.parse
(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.Parses a query string, returning aQuery
.final Query
final Query
final Query
QueryParser.TopLevelQuery
(String field) abstract Query
QueryParserBase.TopLevelQuery
(String field) Methods in org.apache.lucene.queryparser.classic with parameters of type QueryModifier and TypeMethodDescriptionprotected void
QueryParserBase.addClause
(List<BooleanClause> clauses, int conj, int mods, Query q) protected void
QueryParserBase.addMultiTermClauses
(List<BooleanClause> clauses, Query q) Adds clauses generated from analysis over text containing whitespace.private Query
(package private) Query
QueryParserBase.handleBoost
(Query q, Token boost) protected BooleanClause
QueryParserBase.newBooleanClause
(Query q, BooleanClause.Occur occur) Builds a new BooleanClause instanceMethod parameters in org.apache.lucene.queryparser.classic with type arguments of type QueryModifier and TypeMethodDescriptionprotected Query
MultiFieldQueryParser.getMultiFieldQuery
(List<Query> queries) Creates a multifield query -
Uses of Query in org.apache.lucene.queryparser.complexPhrase
Subclasses of Query in org.apache.lucene.queryparser.complexPhraseModifier and TypeClassDescription(package private) static class
Fields in org.apache.lucene.queryparser.complexPhrase declared as QueryModifier and TypeFieldDescriptionprivate final Query[]
ComplexPhraseQueryParser.ComplexPhraseQuery.contents
Methods in org.apache.lucene.queryparser.complexPhrase that return QueryModifier and TypeMethodDescriptionprotected Query
ComplexPhraseQueryParser.getFieldQuery
(String field, String queryText, int slop) protected Query
ComplexPhraseQueryParser.getFuzzyQuery
(String field, String termStr, float minSimilarity) protected Query
ComplexPhraseQueryParser.getRangeQuery
(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected Query
ComplexPhraseQueryParser.getWildcardQuery
(String field, String termStr) protected Query
ComplexPhraseQueryParser.newRangeQuery
(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected Query
ComplexPhraseQueryParser.newTermQuery
(Term term, float boost) ComplexPhraseQueryParser.ComplexPhraseQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.queryparser.ext
Methods in org.apache.lucene.queryparser.ext that return QueryModifier and TypeMethodDescriptionprotected Query
ExtendableQueryParser.getFieldQuery
(String field, String queryText, boolean quoted) abstract Query
ParserExtension.parse
(ExtensionQuery query) Processes the givenExtensionQuery
and returns a correspondingQuery
instance. -
Uses of Query in org.apache.lucene.queryparser.flexible.standard
Methods in org.apache.lucene.queryparser.flexible.standard that return QueryModifier and TypeMethodDescriptionstatic Query
Parses a query which searches on the fields specified.static Query
QueryParserUtil.parse
(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.static Query
QueryParserUtil.parse
(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.OverridesQueryParserHelper.parse(String, String)
so it casts the return object toQuery
. -
Uses of Query in org.apache.lucene.queryparser.flexible.standard.builders
Methods in org.apache.lucene.queryparser.flexible.standard.builders that return QueryModifier and TypeMethodDescription -
Uses of Query in org.apache.lucene.queryparser.flexible.standard.nodes
Methods in org.apache.lucene.queryparser.flexible.standard.nodes that return Query -
Uses of Query in org.apache.lucene.queryparser.simple
Fields in org.apache.lucene.queryparser.simple declared as QueryMethods in org.apache.lucene.queryparser.simple that return QueryModifier and TypeMethodDescriptionprotected Query
SimpleQueryParser.newDefaultQuery
(String text) Factory method to generate a standard query (no phrase or prefix operators).protected Query
SimpleQueryParser.newFuzzyQuery
(String text, int fuzziness) Factory method to generate a fuzzy query.protected Query
SimpleQueryParser.newPhraseQuery
(String text, int slop) Factory method to generate a phrase query with slop.protected Query
SimpleQueryParser.newPrefixQuery
(String text) Factory method to generate a prefix query.Parses the query text and returns parsed queryprotected Query
SimpleQueryParser.simplify
(BooleanQuery bq) Helper to simplify boolean queries with 0 or 1 clauseMethods in org.apache.lucene.queryparser.simple with parameters of type QueryModifier and TypeMethodDescriptionprivate static BooleanQuery
SimpleQueryParser.addClause
(BooleanQuery bq, Query query, BooleanClause.Occur occur) private void
SimpleQueryParser.buildQueryTree
(SimpleQueryParser.State state, Query branch) -
Uses of Query in org.apache.lucene.queryparser.surround.query
Subclasses of Query in org.apache.lucene.queryparser.surround.queryModifier and TypeClassDescription(package private) class
(package private) class
RewriteQuery<SQ extends SrndQuery>
(package private) class
Methods in org.apache.lucene.queryparser.surround.query that return QueryModifier and TypeMethodDescriptionDistanceQuery.getSpanNearQuery
(IndexReader reader, String fieldName, BasicQueryFactory qf) static Query
SrndBooleanQuery.makeBooleanQuery
(List<Query> queries, BooleanClause.Occur occur) SrndQuery.makeLuceneQueryField
(String fieldName, BasicQueryFactory qf) AndQuery.makeLuceneQueryFieldNoBoost
(String fieldName, BasicQueryFactory qf) DistanceQuery.makeLuceneQueryFieldNoBoost
(String fieldName, BasicQueryFactory qf) FieldsQuery.makeLuceneQueryFieldNoBoost
(String fieldName, BasicQueryFactory qf) NotQuery.makeLuceneQueryFieldNoBoost
(String fieldName, BasicQueryFactory qf) OrQuery.makeLuceneQueryFieldNoBoost
(String fieldName, BasicQueryFactory qf) SimpleTerm.makeLuceneQueryFieldNoBoost
(String fieldName, BasicQueryFactory qf) abstract Query
SrndQuery.makeLuceneQueryFieldNoBoost
(String fieldName, BasicQueryFactory qf) FieldsQuery.makeLuceneQueryNoBoost
(BasicQueryFactory qf) DistanceRewriteQuery.rewrite
(IndexReader reader) abstract Query
RewriteQuery.rewrite
(IndexReader reader) SimpleTermRewriteQuery.rewrite
(IndexReader reader) Methods in org.apache.lucene.queryparser.surround.query that return types with arguments of type QueryModifier and TypeMethodDescriptionComposedQuery.makeLuceneSubQueriesField
(String fn, BasicQueryFactory qf) Methods in org.apache.lucene.queryparser.surround.query with parameters of type QueryMethod parameters in org.apache.lucene.queryparser.surround.query with type arguments of type QueryModifier and TypeMethodDescriptionstatic void
SrndBooleanQuery.addQueriesToBoolean
(BooleanQuery.Builder bq, List<Query> queries, BooleanClause.Occur occur) static Query
SrndBooleanQuery.makeBooleanQuery
(List<Query> queries, BooleanClause.Occur occur) -
Uses of Query in org.apache.lucene.queryparser.xml
Methods in org.apache.lucene.queryparser.xml that return Query -
Uses of Query in org.apache.lucene.queryparser.xml.builders
Methods in org.apache.lucene.queryparser.xml.builders that return QueryModifier and TypeMethodDescription -
Uses of Query in org.apache.lucene.sandbox.document
Methods in org.apache.lucene.sandbox.document that return QueryModifier and TypeMethodDescriptionstatic Query
LatLonBoundingBox.newContainsQuery
(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 boxstatic Query
LatLonBoundingBox.newCrossesQuery
(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 boxstatic Query
BigIntegerPoint.newExactQuery
(String field, BigInteger value) Create a query for matching an exact big integer value.static Query
HalfFloatPoint.newExactQuery
(String field, float value) Create a query for matching an exact half-float value.static Query
LatLonBoundingBox.newIntersectsQuery
(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 rangesstatic Query
BigIntegerPoint.newRangeQuery
(String field, BigInteger[] lowerValue, BigInteger[] upperValue) Create a range query for n-dimensional big integer values.static Query
BigIntegerPoint.newRangeQuery
(String field, BigInteger lowerValue, BigInteger upperValue) Create a range query for big integer values.static Query
HalfFloatPoint.newRangeQuery
(String field, float[] lowerValue, float[] upperValue) Create a range query for n-dimensional half-float values.static Query
HalfFloatPoint.newRangeQuery
(String field, float lowerValue, float upperValue) Create a range query for half-float values.private static Query
LatLonBoundingBox.newRangeQuery
(String field, double minLat, double minLon, double maxLat, double maxLon, RangeFieldQuery.QueryType queryType) helper method to create a two-dimensional geospatial bounding box querystatic Query
BigIntegerPoint.newSetQuery
(String field, BigInteger... values) Create a query matching any of the specified 1D values.static Query
HalfFloatPoint.newSetQuery
(String field, float... values) Create a query matching any of the specified 1D values.static Query
HalfFloatPoint.newSetQuery
(String field, Collection<Float> values) Create a query matching any of the specified 1D values.static Query
LatLonBoundingBox.newWithinQuery
(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 -
Uses of Query in org.apache.lucene.sandbox.queries
Subclasses of Query in org.apache.lucene.sandbox.queriesModifier and TypeClassDescriptionclass
Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms.Methods in org.apache.lucene.sandbox.queries that return QueryModifier and TypeMethodDescriptionprivate Query
FuzzyLikeThisQuery.newTermQuery
(IndexReader reader, Term term) FuzzyLikeThisQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.sandbox.search
Subclasses of Query in org.apache.lucene.sandbox.searchModifier and TypeClassDescriptionfinal class
AQuery
that treats multiple fields as a single stream and scores terms as if you had indexed them as a single term in a single field.final class
AQuery
that allows to have a configurable number or required matches per document.class
LikeDocValuesTermsQuery
, but this query only runs on a longNumericDocValuesField
or aSortedNumericDocValuesField
, matching all documents whose value in the specified field is contained in the provided set of long values.class
AQuery
that only accepts documents whose term value in the specified field is contained in the provided set of allowed terms.class
A range query that can take advantage of the fact that the index is sorted to speed up execution.class
Abstract class for range queries involving multiple ranges against physical points such asIntPoints
All ranges are logically ORed togetherclass
A generalized version ofPhraseQuery
, built with one or moreMultiTermQuery
that provides term expansions for multi-terms (one of the expanded terms must match).class
A proximity query that lets you express an automaton, whose transitions are terms, to match documents.Fields in org.apache.lucene.sandbox.search declared as QueryModifier and TypeFieldDescriptionprivate final Query
IndexSortSortedNumericDocValuesRangeQuery.fallbackQuery
protected static final Query
PhraseWildcardQuery.NO_MATCH_QUERY
Fields in org.apache.lucene.sandbox.search with type parameters of type QueryModifier and TypeFieldDescriptionprivate final Collection<Query>
CoveringQuery.queries
QueryProfilerTree.queries
A list of the original queries, keyed by index positionMethods in org.apache.lucene.sandbox.search that return QueryModifier and TypeMethodDescriptionIndexSortSortedNumericDocValuesRangeQuery.getFallbackQuery()
protected Query
PhraseWildcardQuery.MultiTerm.getQuery()
protected abstract Query
PhraseWildcardQuery.PhraseTerm.getQuery()
protected Query
PhraseWildcardQuery.SingleTerm.getQuery()
CombinedFieldQuery.rewrite
(IndexReader reader) CoveringQuery.rewrite
(IndexReader reader) IndexSortSortedNumericDocValuesRangeQuery.rewrite
(IndexReader reader) MultiRangeQuery.rewrite
(IndexReader reader) Merges the overlapping ranges and returns unconnected ranges by callingMultiRangeQuery.mergeOverlappingRanges(java.util.List<org.apache.lucene.sandbox.search.MultiRangeQuery.RangeClause>, int)
PhraseWildcardQuery.rewrite
(IndexReader reader) TermAutomatonQuery.rewrite
(IndexReader reader) Methods in org.apache.lucene.sandbox.search with parameters of type QueryModifier and TypeMethodDescriptionprivate QueryProfilerBreakdown
QueryProfilerTree.addDependencyNode
(Query query, int token) Helper method to add a new node to the dependency tree.QueryProfilerIndexSearcher.createWeight
(Query query, ScoreMode scoreMode, float boost) private String
QueryProfilerTree.getDescriptionFromQuery
(Query query) QueryProfilerTree.getProfileBreakdown
(Query query) Returns aQueryProfilerBreakdown
for a scoring query.private String
QueryProfilerTree.getTypeFromQuery
(Query query) Constructors in org.apache.lucene.sandbox.search with parameters of type QueryModifierConstructorDescription(package private)
CombinedFieldWeight
(Query query, IndexSearcher searcher, ScoreMode scoreMode, float boost) (package private)
CoveringWeight
(Query query, Collection<Weight> weights, LongValuesSource minimumNumberMatch) IndexSortSortedNumericDocValuesRangeQuery
(String field, long lowerValue, long upperValue, Query fallbackQuery) Creates a newIndexSortSortedNumericDocValuesRangeQuery
.QueryProfilerWeight
(Query query, Weight subQueryWeight, QueryProfilerBreakdown profile) Constructor parameters in org.apache.lucene.sandbox.search with type arguments of type QueryModifierConstructorDescriptionCoveringQuery
(Collection<Query> queries, LongValuesSource minimumNumberMatch) Sole constructor. -
Uses of Query in org.apache.lucene.search
Subclasses of Query in org.apache.lucene.searchModifier and TypeClassDescriptionclass
AQuery
that will match terms against a finite-state machine.final class
AQuery
that blends index statistics across multiple terms.class
A Query that matches documents matching boolean combinations of other queries, e.g.final class
AQuery
wrapper that allows to give a boost to the wrapped query.final class
A query that wraps another query and simply returns a constant score equal to 1 for every document that matches the query.final class
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.final class
Deprecated.(package private) static class
class
AQuery
that matches documents that contain either aKnnVectorField
, or a field that indexes norms or doc values.class
Implements the fuzzy search query.final class
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
A Query that matches documents matching combinations of subqueries.class
A Basic abstract query that all IndriQueries can extend to implement toString, equals, getClauses, and iterator.class
Deprecated.UseFieldExistsQuery
instead.class
UsesKnnVectorsReader.search(java.lang.String, float[], int, org.apache.lucene.util.Bits, int)
to perform nearest neighbour search.(package private) static class
Caches the results of a KnnVector search: a list of docs and their scoresfinal class
A query that matches all documents.class
A query that matches no documents.class
A generalized version ofPhraseQuery
, with the possibility of adding more than one term at the same position that are treated as a disjunction (OR).class
An abstractQuery
that matches documents containing a subset of terms provided by aFilteredTermsEnum
enumeration.(package private) final class
MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery>
This class also provides the functionality behindMultiTermQuery.CONSTANT_SCORE_REWRITE
.private static class
class
This is aPhraseQuery
which is optimized for n-gram phrase query.final class
Deprecated.UseFieldExistsQuery
instead.class
A Query that matches documents containing a particular sequence of terms.class
Abstract query class to find all documents whose single or multi-dimensional point values, previously indexed with e.g.class
Abstract class for range queries against single or multidimensional points such asIntPoint
.class
A Query that matches documents containing terms with a specified prefix.class
A fast regular expression query based on theorg.apache.lucene.util.automaton
package.final class
A query that treats multiple terms as synonyms.class
Specialization for a disjunction over many terms that behaves like aConstantScoreQuery
over aBooleanQuery
containing onlyBooleanClause.Occur.SHOULD
clauses.class
A Query that matches documents containing a term.class
A Query that matches documents within an range of terms.class
Implements the wildcard search query.Fields in org.apache.lucene.search declared as QueryModifier and TypeFieldDescriptionprivate final Query
IndexOrDocValuesQuery.dvQuery
private final Query
KnnVectorQuery.filter
private final Query
NamedMatches.NamedQuery.in
private final Query
IndexOrDocValuesQuery.indexQuery
protected final Query
Weight.parentQuery
private final Query
BooleanClause.query
The query whose matching documents are combined by the boolean query.private final Query
BoostQuery.query
private final Query
ConstantScoreQuery.query
private final Query
DisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator.query
private final Query
DoubleValuesSource.QueryDoubleValuesSource.query
private final Query
QueryRescorer.query
private final Query
TermMatchesIterator.query
Fields in org.apache.lucene.search with type parameters of type QueryModifier and TypeFieldDescriptionprivate final Map<Query,
LRUQueryCache.CacheAndCount> LRUQueryCache.LeafCache.cache
private final Map<BooleanClause.Occur,
Collection<Query>> BooleanQuery.clauseSets
DisjunctionMaxQuery.disjuncts
LRUQueryCache.mostRecentlyUsedQueries
LRUQueryCache.uniqueQueries
LRUQueryCache.uniqueQueries
Methods in org.apache.lucene.search that return QueryModifier and TypeMethodDescriptionprotected Query
MultiTermQuery.TopTermsBlendedFreqScoringRewrite.build
(BlendedTermQuery.Builder builder) protected Query
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.build
(BooleanQuery.Builder builder) protected Query
MultiTermQuery.TopTermsScoringBooleanQueryRewrite.build
(BooleanQuery.Builder builder) protected abstract Query
Finalize the creation of the query from the builder.private Query
KnnVectorQuery.createRewrittenQuery
(IndexReader reader, TopDocs topK) IndexOrDocValuesQuery.getIndexQuery()
Return the wrapped query that may be costly to initialize but has a good iterator.BooleanClause.getQuery()
BoostQuery.getQuery()
Return the wrappedQuery
.ConstantScoreQuery.getQuery()
Returns the encapsulated query.DisjunctionMatchesIterator.getQuery()
DisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator.getQuery()
FilterMatchesIterator.getQuery()
MatchesIterator.getQuery()
Returns the Query causing the current matchTermMatchesIterator.getQuery()
final Query
Weight.getQuery()
The query that this concerns.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.final Query
BlendedTermQuery.rewrite
(IndexReader reader) abstract Query
Merge the provided sub queries into a singleQuery
object.BooleanQuery.rewrite
(IndexReader reader) BoostQuery.rewrite
(IndexReader reader) ConstantScoreQuery.rewrite
(IndexReader reader) DisjunctionMaxQuery.rewrite
(IndexReader reader) Optimize our representation and our subqueries representationsDocValuesRewriteMethod.rewrite
(IndexReader reader, MultiTermQuery query) FieldExistsQuery.rewrite
(IndexReader reader) IndexOrDocValuesQuery.rewrite
(IndexReader reader) Expert: called to re-write queries into primitive queries.private Query
KnnVectorQuery.rewrite
(IndexReader reader) MultiPhraseQuery.rewrite
(IndexReader reader) final Query
MultiTermQuery.rewrite
(IndexReader reader) To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getTermsEnum(Terms, AttributeSource)
.abstract Query
MultiTermQuery.RewriteMethod.rewrite
(IndexReader reader, MultiTermQuery query) NamedMatches.NamedQuery.rewrite
(IndexReader reader) NGramPhraseQuery.rewrite
(IndexReader reader) PhraseQuery.rewrite
(IndexReader reader) Query.rewrite
(IndexReader reader) Expert: called to re-write queries into primitive queries.final Query
ScoringRewrite.rewrite
(IndexReader reader, MultiTermQuery query) SynonymQuery.rewrite
(IndexReader reader) TermInSetQuery.rewrite
(IndexReader reader) final Query
TopTermsRewrite.rewrite
(IndexReader reader, MultiTermQuery query) static Query
Wrap a Query so that it associates a name with itsMatches
Methods in org.apache.lucene.search that return types with arguments of type QueryModifier and TypeMethodDescriptionLRUQueryCache.cachedQueries()
(package private) Collection<Query>
BooleanQuery.getClauses
(BooleanClause.Occur occur) Return the collection of queries for the givenBooleanClause.Occur
.DisjunctionMaxQuery.getDisjuncts()
DisjunctionMaxQuery.iterator()
Methods in org.apache.lucene.search with parameters of type QueryModifier and TypeMethodDescriptionBooleanQuery.Builder.add
(Query query, BooleanClause.Occur occur) Add a new clause to thisBooleanQuery.Builder
.void
LRUQueryCache.clearQuery
(Query query) Remove all cache entries for the given query.void
QueryVisitor.consumeTerms
(Query query, Term... terms) Called by leaf queries that match on specific termsvoid
QueryVisitor.consumeTermsMatching
(Query query, String field, Supplier<ByteRunAutomaton> automaton) Called by leaf queries that match on a class of termsint
Count how many documents match the given query.IndexSearcher.createWeight
(Query query, ScoreMode scoreMode, float boost) Creates aWeight
for the given query, potentially adding caching if possible and configured.static MatchesIterator
MatchesUtils.disjunction
(LeafReaderContext context, int doc, Query query, String field, BytesRefIterator terms) Create a MatchesIterator that is a disjunction over a list of terms extracted from aBytesRefIterator
.Returns an Explanation that describes howdoc
scored againstquery
.(package private) int
static DoubleValuesSource
Create a DoubleValuesSource that returns the score of a particular query(package private) static MatchesIterator
DisjunctionMatchesIterator.fromTerms
(LeafReaderContext context, int doc, Query query, String field, List<Term> terms) Create aDisjunctionMatchesIterator
over a list of terms(package private) static MatchesIterator
DisjunctionMatchesIterator.fromTermsEnum
(LeafReaderContext context, int doc, Query query, String field, BytesRefIterator terms) Create aDisjunctionMatchesIterator
over a list of terms extracted from aBytesRefIterator
(package private) LRUQueryCache.CacheAndCount
LRUQueryCache.get
(Query key, IndexReader.CacheHelper cacheHelper) (package private) LRUQueryCache.CacheAndCount
QueryVisitor.getSubVisitor
(BooleanClause.Occur occur, Query parent) Pulls a visitor instance for visiting child clauses of a query(package private) static boolean
private static boolean
UsageTrackingQueryCachingPolicy.isPointQuery
(Query query) protected int
UsageTrackingQueryCachingPolicy.minFrequencyToCache
(Query query) For a given filter, return how many times it should appear in the history before being cached.private void
LRUQueryCache.onEviction
(Query singleton) protected void
Expert: callback when there is a cache hit on a given query.protected void
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
Callback that is called every time that a cached filter is used.void
static void
TopFieldCollector.populateScores
(ScoreDoc[] topDocs, IndexSearcher searcher, Query query) Populatescores
of the giventopDocs
.(package private) void
LRUQueryCache.LeafCache.putIfAbsent
(Query query, LRUQueryCache.CacheAndCount cached) private void
LRUQueryCache.putIfAbsent
(Query query, LRUQueryCache.CacheAndCount cached, IndexReader.CacheHelper cacheHelper) (package private) void
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 * secondPassScoreabstract Query
Merge the provided sub queries into a singleQuery
object.Expert: called to re-write queries into primitive queries.private Query
Finds the topn
hits forquery
.Search implementation with arbitrary sorting.Search implementation with arbitrary sorting, plus control over whether hit scores and max score should be computed.void
Lower-level search API.<C extends Collector,
T>
TIndexSearcher.search
(Query query, CollectorManager<C, T> collectorManager) Lower-level search API.private TopFieldDocs
IndexSearcher.searchAfter
(FieldDoc after, Query query, int numHits, Sort sort, boolean doDocScores) IndexSearcher.searchAfter
(ScoreDoc after, Query query, int numHits) Finds the topn
hits forquery
where all results are after a previous result (after
).IndexSearcher.searchAfter
(ScoreDoc after, Query query, int n, Sort sort) Finds the topn
hits forquery
where all results are after a previous result (after
).IndexSearcher.searchAfter
(ScoreDoc after, Query query, int numHits, Sort sort, boolean doDocScores) Finds the topn
hits forquery
where all results are after a previous result (after
), allowing control over whether hit scores and max score should be computed.boolean
QueryCachingPolicy.shouldCache
(Query query) Whether the givenQuery
is worth caching.boolean
UsageTrackingQueryCachingPolicy.shouldCache
(Query query) private static boolean
UsageTrackingQueryCachingPolicy.shouldNeverCache
(Query query) void
Called by leaf queries that do not match on termsstatic Query
Wrap a Query so that it associates a name with itsMatches
Constructors in org.apache.lucene.search with parameters of type QueryModifierConstructorDescriptionBooleanClause
(Query query, BooleanClause.Occur occur) Constructs a BooleanClause.BoostQuery
(Query query, float boost) Sole constructor: wrapquery
in such a way that the produced scores will be boosted byboost
.ConstantScoreQuery
(Query query) Strips off scores from the passed in Query.protected
ConstantScoreWeight
(Query query, float score) protected
FilterWeight
(Query query, Weight weight) Alternative constructor.IndexOrDocValuesQuery
(Query indexQuery, Query dvQuery) Create anIndexOrDocValuesQuery
.KnnVectorQuery
(String field, float[] target, int k, Query filter) Find thek
nearest documents to the target vector according to the vectors in the given field.private
NamedQuery
(String name, Query in) protected
PhraseWeight
(Query query, String field, IndexSearcher searcher, ScoreMode scoreMode) Expert: Creates PhraseWeight instanceprivate
QueryDoubleValuesSource
(Query query) QueryRescorer
(Query query) Sole constructor, passing the 2nd pass query to assign scores to the 1st pass hits.(package private)
SynonymWeight
(Query query, IndexSearcher searcher, ScoreMode scoreMode, float boost) (package private)
TermMatchesIterator
(Query query, PostingsEnum pe) Create a newTermMatchesIterator
for the given term and postings list(package private)
TermsEnumDisjunctionMatchesIterator
(MatchesIterator first, BytesRefIterator terms, TermsEnum te, int doc, Query query) protected
Sole constructor, typically invoked by sub-classes.Constructor parameters in org.apache.lucene.search with type arguments of type QueryModifierConstructorDescriptionDisjunctionMaxQuery
(Collection<Query> disjuncts, float tieBreakerMultiplier) Creates a new DisjunctionMaxQuery -
Uses of Query in org.apache.lucene.search.grouping
Fields in org.apache.lucene.search.grouping declared as QueryMethods in org.apache.lucene.search.grouping with parameters of type QueryModifier and TypeMethodDescriptionprotected 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.Constructors in org.apache.lucene.search.grouping with parameters of type QueryModifierConstructorDescriptionprivate
GroupingSearch
(GroupSelector<?> grouper, Query groupEndDocs) GroupingSearch
(Query groupEndDocs) Constructor for grouping documents by doc block. -
Uses of Query in org.apache.lucene.search.highlight
Fields in org.apache.lucene.search.highlight declared as QueryMethods in org.apache.lucene.search.highlight with parameters of type QueryModifier and TypeMethodDescriptionvoid
QueryTermExtractor.BoostedTermExtractor.consumeTerms
(Query query, Term... terms) protected void
WeightedSpanTermExtractor.extract
(Query query, float boost, Map<String, WeightedSpanTerm> terms) protected void
WeightedSpanTermExtractor.extractUnknownQuery
(Query query, Map<String, WeightedSpanTerm> terms) protected void
WeightedSpanTermExtractor.extractWeightedTerms
(Map<String, WeightedSpanTerm> terms, Query query, float boost) static final WeightedTerm[]
QueryTermExtractor.getIdfWeightedTerms
(Query query, IndexReader reader, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTermsQueryTermExtractor.BoostedTermExtractor.getSubVisitor
(BooleanClause.Occur occur, Query parent) static final WeightedTerm[]
Extracts all terms texts of a given Query into an array of WeightedTermsstatic final WeightedTerm[]
Extracts all terms texts of a given Query into an array of WeightedTermsstatic WeightedTerm[]
Extracts all terms texts of a given Query into an array of WeightedTermsWeightedSpanTermExtractor.getWeightedSpanTerms
(Query query, float boost, TokenStream tokenStream) Creates a Map ofWeightedSpanTerms
from the givenQuery
andTokenStream
.WeightedSpanTermExtractor.getWeightedSpanTerms
(Query query, float boost, TokenStream tokenStream, String fieldName) Creates a Map ofWeightedSpanTerms
from the givenQuery
andTokenStream
.WeightedSpanTermExtractor.getWeightedSpanTermsWithScores
(Query query, float boost, TokenStream tokenStream, String fieldName, IndexReader reader) Creates a Map ofWeightedSpanTerms
from the givenQuery
andTokenStream
.private void
QueryScorer.init
(Query query, String field, IndexReader reader, boolean expandMultiTermQuery) Method parameters in org.apache.lucene.search.highlight with type arguments of type QueryModifier and TypeMethodDescriptionprotected boolean
WeightedSpanTermExtractor.isQueryUnsupported
(Class<? extends Query> clazz) Constructors in org.apache.lucene.search.highlight with parameters of type QueryModifierConstructorDescriptionQueryScorer
(Query query) QueryScorer
(Query query, String field) QueryScorer
(Query query, String field, String defaultField) QueryScorer
(Query query, IndexReader reader, String field) QueryScorer
(Query query, IndexReader reader, String field, String defaultField) QueryTermScorer
(Query query) QueryTermScorer
(Query query, String fieldName) QueryTermScorer
(Query query, IndexReader reader, String fieldName) -
Uses of Query in org.apache.lucene.search.join
Subclasses of Query in org.apache.lucene.search.joinModifier and TypeClassDescription(package private) final class
(package private) final class
class
A query that returns all the matching child documents for a specific parent document indexed together in the same block.(package private) class
(package private) class
(package private) class
A query that has an array of terms from a specific field.class
Just likeToParentBlockJoinQuery
, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.class
This query requires that you index children and parent docs as a single block, using theIndexWriter.addDocuments()
orIndexWriter.updateDocuments()
API.Fields in org.apache.lucene.search.join declared as QueryModifier and TypeFieldDescriptionprivate final Query
ParentChildrenBlockJoinQuery.childQuery
private final Query
ToParentBlockJoinQuery.childQuery
private final Query
GlobalOrdinalsQuery.fromQuery
private final Query
GlobalOrdinalsWithScoreQuery.fromQuery
private final Query
TermsIncludingScoreQuery.fromQuery
private final Query
TermsQuery.fromQuery
(package private) final Query
PointInSetIncludingScoreQuery.originalQuery
private final Query
ToChildBlockJoinQuery.parentQuery
private final Query
QueryBitSetProducer.query
private final Query
GlobalOrdinalsQuery.toQuery
private final Query
GlobalOrdinalsWithScoreQuery.toQuery
Methods in org.apache.lucene.search.join that return QueryModifier and TypeMethodDescriptionprivate static Query
JoinUtil.createJoinQuery
(boolean multipleValuesPerDocument, String toField, Query fromQuery, String fromField, IndexSearcher fromSearcher, ScoreMode scoreMode, GenericTermsCollector collector) static Query
JoinUtil.createJoinQuery
(String fromField, boolean multipleValuesPerDocument, String toField, Class<? extends Number> numericType, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode) Method for query time joining for numeric fields.static Query
JoinUtil.createJoinQuery
(String fromField, boolean multipleValuesPerDocument, String toField, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode) Method for query time joining.static Query
JoinUtil.createJoinQuery
(String joinField, Query fromQuery, Query toQuery, IndexSearcher searcher, ScoreMode scoreMode, OrdinalMap ordinalMap) Delegates toJoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, OrdinalMap, int, int)
, but disables the min and max filtering.static Query
JoinUtil.createJoinQuery
(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.ToParentBlockJoinQuery.getChildQuery()
Return our child query.ToChildBlockJoinQuery.getParentQuery()
Return our parent query.QueryBitSetProducer.getQuery()
Gets the contained query.ParentChildrenBlockJoinQuery.rewrite
(IndexReader reader) ToChildBlockJoinQuery.rewrite
(IndexReader reader) ToParentBlockJoinQuery.rewrite
(IndexReader reader) Methods in org.apache.lucene.search.join with parameters of type QueryModifier and TypeMethodDescriptionprivate static Query
JoinUtil.createJoinQuery
(boolean multipleValuesPerDocument, String toField, Query fromQuery, String fromField, IndexSearcher fromSearcher, ScoreMode scoreMode, GenericTermsCollector collector) static Query
JoinUtil.createJoinQuery
(String fromField, boolean multipleValuesPerDocument, String toField, Class<? extends Number> numericType, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode) Method for query time joining for numeric fields.static Query
JoinUtil.createJoinQuery
(String fromField, boolean multipleValuesPerDocument, String toField, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode) Method for query time joining.static Query
JoinUtil.createJoinQuery
(String joinField, Query fromQuery, Query toQuery, IndexSearcher searcher, ScoreMode scoreMode, OrdinalMap ordinalMap) Delegates toJoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, OrdinalMap, int, int)
, but disables the min and max filtering.static Query
JoinUtil.createJoinQuery
(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.Constructors in org.apache.lucene.search.join with parameters of type QueryModifierConstructorDescriptionBlockJoinWeight
(Query joinQuery, Weight childWeight, BitSetProducer parentsFilter, ScoreMode scoreMode) (package private)
GlobalOrdinalsQuery
(LongBitSet foundOrds, String joinField, OrdinalMap globalOrds, Query toQuery, Query fromQuery, Object indexReaderContextId) (package private)
GlobalOrdinalsWithScoreQuery
(GlobalOrdinalsWithScoreCollector collector, ScoreMode scoreMode, String joinField, OrdinalMap globalOrds, Query toQuery, Query fromQuery, int min, int max, Object indexReaderContextId) ParentChildrenBlockJoinQuery
(BitSetProducer parentFilter, Query childQuery, int parentDocId) Creates aParentChildrenBlockJoinQuery
instance(package private)
PointInSetIncludingScoreQuery
(ScoreMode scoreMode, Query originalQuery, boolean multipleValuesPerDocument, String field, int bytesPerDim, PointInSetIncludingScoreQuery.Stream packedPoints) QueryBitSetProducer
(Query query) Wraps another query's result and caches it into bitsets.(package private)
TermsIncludingScoreQuery
(ScoreMode scoreMode, String toField, boolean multipleValuesPerDocument, BytesRefHash terms, float[] scores, String fromField, Query fromQuery, Object indexReaderContextId) (package private)
TermsQuery
(String toField, BytesRefHash terms, String fromField, Query fromQuery, Object indexReaderContextId) ToChildBlockJoinQuery
(Query parentQuery, BitSetProducer parentsFilter) Create a ToChildBlockJoinQuery.ToChildBlockJoinWeight
(Query joinQuery, Weight parentWeight, BitSetProducer parentsFilter, boolean doScores) ToParentBlockJoinQuery
(Query childQuery, BitSetProducer parentsFilter, ScoreMode scoreMode) Create a ToParentBlockJoinQuery.(package private)
(package private)
-
Uses of Query in org.apache.lucene.search.matchhighlight
Fields in org.apache.lucene.search.matchhighlight declared as QueryMethods in org.apache.lucene.search.matchhighlight with parameters of type QueryModifier and TypeMethodDescription(package private) void
MatchHighlighter.DocHit.addMatches
(Query query, Map<String, List<OffsetRange>> hits) Constructors in org.apache.lucene.search.matchhighlight with parameters of type QueryModifierConstructorDescriptionMatchRegionRetriever
(IndexSearcher searcher, Query query, Analyzer analyzer) A constructor with the default offset strategy supplier.MatchRegionRetriever
(IndexSearcher searcher, Query query, OffsetsRetrievalStrategySupplier fieldOffsetStrategySupplier) (package private)
QueryOffsetRange
(Query query, int from, int to) -
Uses of Query in org.apache.lucene.search.suggest.analyzing
Methods in org.apache.lucene.search.suggest.analyzing that return QueryModifier and TypeMethodDescriptionprotected Query
AnalyzingInfixSuggester.finishQuery
(BooleanQuery.Builder in, boolean allTermsRequired) Subclass can override this to tweak the Query before searching.protected Query
AnalyzingInfixSuggester.getLastTokenQuery
(String token) This is called if the last token isn't ended (e.g. -
Uses of Query in org.apache.lucene.search.suggest.document
Subclasses of Query in org.apache.lucene.search.suggest.documentModifier and TypeClassDescriptionclass
AbstractQuery
that match documents containing terms with a specified prefix filtered byBitsProducer
.class
ACompletionQuery
that matches documents specified by a wrappedCompletionQuery
supporting boosting and/or filtering by specified contexts.class
ACompletionQuery
that match documents containing terms within an edit distance of the specified prefix.class
ACompletionQuery
which takes anAnalyzer
to analyze the prefix of the query term.class
ACompletionQuery
which takes a regular expression as the prefix of the query term.Methods in org.apache.lucene.search.suggest.document that return Query -
Uses of Query in org.apache.lucene.search.uhighlight
Fields in org.apache.lucene.search.uhighlight declared as QueryFields in org.apache.lucene.search.uhighlight with type parameters of type QueryMethods in org.apache.lucene.search.uhighlight that return QueryMethods in org.apache.lucene.search.uhighlight that return types with arguments of type QueryModifier and TypeMethodDescriptionprotected Collection<Query>
UnifiedHighlighter.preSpanQueryRewrite
(Query query) When highlighting phrases accurately, we may need to handle custom queries that aren't supported in theWeightedSpanTermExtractor
as called by thePhraseHelper
.Methods in org.apache.lucene.search.uhighlight with parameters of type QueryModifier and TypeMethodDescriptionstatic boolean
MultiTermHighlighting.canExtractAutomataFromLeafQuery
(Query query) Indicates if the the leaf query (fromQueryVisitor.visitLeaf(Query)
) is a type of query that we can extract automata from.void
MultiTermHighlighting.AutomataCollector.consumeTermsMatching
(Query query, String field, Supplier<ByteRunAutomaton> automaton) (package private) static LabelledCharArrayMatcher[]
MultiTermHighlighting.extractAutomata
(Query query, Predicate<String> fieldMatcher, boolean lookInSpan) Extracts MultiTermQueries that match the provided field predicate.UnifiedHighlighter.extractTerms
(Query query) Extracts matching terms after rewriting against an empty indexprotected LabelledCharArrayMatcher[]
UnifiedHighlighter.getAutomata
(String field, Query query, Set<UnifiedHighlighter.HighlightFlag> highlightFlags) protected FieldHighlighter
UnifiedHighlighter.getFieldHighlighter
(String field, Query query, Set<Term> allTerms, int maxPassages) protected UHComponents
UnifiedHighlighter.getHighlightComponents
(String field, Query query, Set<Term> allTerms) protected PhraseHelper
UnifiedHighlighter.getPhraseHelper
(String field, Query query, Set<UnifiedHighlighter.HighlightFlag> highlightFlags) MultiTermHighlighting.AutomataCollector.getSubVisitor
(BooleanClause.Occur occur, Query parent) protected boolean
UnifiedHighlighter.hasUnrecognizedQuery
(Predicate<String> fieldMatcher, Query query) String[]
Highlights the top passages from a single field.String[]
Highlights the top-N passages from a single field.UnifiedHighlighter.highlightFields
(String[] fieldsIn, Query query, int[] docidsIn, int[] maxPassagesIn) Highlights the top-N passages from multiple fields, for the provided int[] docids.UnifiedHighlighter.highlightFields
(String[] fields, Query query, TopDocs topDocs) Highlights the top passages from multiple fields.UnifiedHighlighter.highlightFields
(String[] fields, Query query, TopDocs topDocs, int[] maxPassages) Highlights the top-N passages from multiple fields.UnifiedHighlighter.highlightFieldsAsObjects
(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 thePassageFormatter
.UnifiedHighlighter.highlightWithoutSearcher
(String field, Query query, String content, int maxPassages) Highlights text passed as a parameter.protected Collection<Query>
UnifiedHighlighter.preSpanQueryRewrite
(Query query) When highlighting phrases accurately, we may need to handle custom queries that aren't supported in theWeightedSpanTermExtractor
as called by thePhraseHelper
.private BytesRef
OffsetsEnum.OfMatchesIteratorWithSubs.queryToTerm
(Query query) Maps a Query fromMatchesIterator.getQuery()
toOffsetsEnum.getTerm()
.Constructors in org.apache.lucene.search.uhighlight with parameters of type QueryModifierConstructorDescriptionPhraseHelper
(Query query, String field, Predicate<String> fieldMatcher, Function<SpanQuery, Boolean> rewriteQueryPred, Function<Query, Collection<Query>> preExtractRewriteFunction, boolean ignoreQueriesNeedingRewrite) Constructor.UHComponents
(String field, Predicate<String> fieldMatcher, Query query, BytesRef[] terms, PhraseHelper phraseHelper, LabelledCharArrayMatcher[] automata, boolean hasUnrecognizedQueryPart, Set<UnifiedHighlighter.HighlightFlag> highlightFlags) -
Uses of Query in org.apache.lucene.search.vectorhighlight
Methods in org.apache.lucene.search.vectorhighlight that return types with arguments of type QueryModifier and TypeMethodDescription(package private) Collection<Query>
FieldQuery.expand
(Collection<Query> flatQueries) Methods in org.apache.lucene.search.vectorhighlight with parameters of type QueryModifier and TypeMethodDescription(package private) void
FieldQuery.QueryPhraseMap.add
(Query query, IndexReader reader) protected void
FieldQuery.flatten
(Query sourceQuery, IndexReader reader, Collection<Query> flatQueries, float boost) FastVectorHighlighter.getFieldQuery
(Query query) create aFieldQuery
object.FastVectorHighlighter.getFieldQuery
(Query query, IndexReader reader) create aFieldQuery
object.private String
(package private) FieldQuery.QueryPhraseMap
FieldQuery.getRootMap
(Query query) FieldQuery.getTermSet
(Query query) Method parameters in org.apache.lucene.search.vectorhighlight with type arguments of type QueryModifier and TypeMethodDescriptionprivate void
FieldQuery.checkOverlap
(Collection<Query> expandQueries, Term[] src, Term[] dest, int slop, float boost) private void
FieldQuery.checkOverlap
(Collection<Query> expandQueries, PhraseQuery a, float aBoost, PhraseQuery b, float bBoost) (package private) Collection<Query>
FieldQuery.expand
(Collection<Query> flatQueries) protected void
FieldQuery.flatten
(Query sourceQuery, IndexReader reader, Collection<Query> flatQueries, float boost) (package private) void
FieldQuery.saveTerms
(Collection<Query> flatQueries, IndexReader reader) Constructors in org.apache.lucene.search.vectorhighlight with parameters of type QueryModifierConstructorDescription(package private)
FieldQuery
(Query query, boolean phraseHighlight, boolean fieldMatch) For backwards compatibility you can initialize FieldQuery without an IndexReader, which is only required to support MultiTermQueryFieldQuery
(Query query, IndexReader reader, boolean phraseHighlight, boolean fieldMatch) -
Uses of Query in org.apache.lucene.spatial3d
Subclasses of Query in org.apache.lucene.spatial3dModifier and TypeClassDescription(package private) final class
Finds all previously indexed points that fall within the specified polygon.Methods in org.apache.lucene.spatial3d that return QueryModifier and TypeMethodDescriptionstatic Query
Geo3DPoint.newBoxQuery
(String field, PlanetModel planetModel, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) Create a query for matching a box.static Query
Geo3DPoint.newDistanceQuery
(String field, PlanetModel planetModel, double latitude, double longitude, double radiusMeters) Create a query for matching points within the specified distance of the supplied location.static Query
Geo3DPoint.newLargePolygonQuery
(String field, PlanetModel planetModel, Polygon... polygons) Create a query for matching a large polygon.static Query
Geo3DPoint.newPathQuery
(String field, double[] pathLatitudes, double[] pathLongitudes, double pathWidthMeters, PlanetModel planetModel) Create a query for matching a path.static Query
Geo3DPoint.newPolygonQuery
(String field, PlanetModel planetModel, Polygon... polygons) Create a query for matching a polygon.static Query
Geo3DPoint.newShapeQuery
(String field, GeoShape shape) Returns a query matching all points inside the provided shape. -
Uses of Query in org.apache.lucene.util
Fields in org.apache.lucene.util declared as QueryModifier and TypeFieldDescription(package private) Query
RamUsageEstimator.RamUsageQueryVisitor.root
Methods in org.apache.lucene.util that return QueryModifier and TypeMethodDescriptionprotected Query
QueryBuilder.analyzeBoolean
(String field, TokenStream stream) Creates simple boolean query from the cached tokenstream contentsprotected Query
QueryBuilder.analyzeGraphBoolean
(String field, TokenStream source, BooleanClause.Occur operator) Creates a boolean query from a graph token stream.protected Query
QueryBuilder.analyzeGraphPhrase
(TokenStream source, String field, int phraseSlop) Creates graph phrase query from the tokenstream contentsprotected Query
QueryBuilder.analyzeMultiBoolean
(String field, TokenStream stream, BooleanClause.Occur operator) Creates complex boolean query from the cached tokenstream contentsprotected Query
QueryBuilder.analyzeMultiPhrase
(String field, TokenStream stream, int slop) Creates complex phrase query from the cached tokenstream contentsprotected Query
QueryBuilder.analyzePhrase
(String field, TokenStream stream, int slop) Creates simple phrase query from the cached tokenstream contentsprotected Query
QueryBuilder.analyzeTerm
(String field, TokenStream stream) Creates simple term query from the cached tokenstream contentsQueryBuilder.createBooleanQuery
(String field, String queryText) Creates a boolean query from the query text.QueryBuilder.createBooleanQuery
(String field, String queryText, BooleanClause.Occur operator) Creates a boolean query from the query text.protected Query
QueryBuilder.createFieldQuery
(Analyzer analyzer, BooleanClause.Occur operator, String field, String queryText, boolean quoted, int phraseSlop) Creates a query from the analysis chain.protected Query
QueryBuilder.createFieldQuery
(TokenStream source, BooleanClause.Occur operator, String field, boolean quoted, int phraseSlop) Creates a query from a token stream.QueryBuilder.createMinShouldMatchQuery
(String field, String queryText, float fraction) Creates a minimum-should-match query from the query text.QueryBuilder.createPhraseQuery
(String field, String queryText) Creates a phrase query from the query text.QueryBuilder.createPhraseQuery
(String field, String queryText, int phraseSlop) Creates a phrase query from the query text.protected Query
QueryBuilder.newGraphSynonymQuery
(Iterator<Query> queries) Builds a new GraphQuery for multi-terms synonyms.protected Query
QueryBuilder.newSynonymQuery
(QueryBuilder.TermAndBoost[] terms) Builds a new SynonymQuery instance.protected Query
QueryBuilder.newTermQuery
(Term term, float boost) Builds a new TermQuery instance.Methods in org.apache.lucene.util with parameters of type QueryModifier and TypeMethodDescriptionvoid
RamUsageEstimator.RamUsageQueryVisitor.consumeTerms
(Query query, Term... terms) RamUsageEstimator.RamUsageQueryVisitor.getSubVisitor
(BooleanClause.Occur occur, Query parent) static long
Returns the size in bytes of a Query object.static long
Returns the size in bytes of a Query object.void
Method parameters in org.apache.lucene.util with type arguments of type QueryModifier and TypeMethodDescriptionprotected Query
QueryBuilder.newGraphSynonymQuery
(Iterator<Query> queries) Builds a new GraphQuery for multi-terms synonyms.Constructors in org.apache.lucene.util with parameters of type Query -
Uses of Query in org.apache.lucene.util.automaton
Methods in org.apache.lucene.util.automaton with parameters of type QueryModifier and TypeMethodDescriptionvoid
CompiledAutomaton.visit
(QueryVisitor visitor, Query parent, String field) Report back to a QueryVisitor how this automaton matches terms
FieldExistsQuery
instead.