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.
Misc search implementations.
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 QueryBM25NBClassifier.queryQueryused to eventually filter the document set to be used to classifyprivate final QueryKNearestFuzzyClassifier.queryaQueryused to filter the documents that should be used from this classifier's underlyingLeafReaderprotected final QueryKNearestNeighborClassifier.queryaQueryused to filter the documents that should be used from this classifier's underlyingLeafReaderprotected final QuerySimpleNaiveBayesClassifier.queryQueryused 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 aBooleanPerceptronClassifierCachingNaiveBayesClassifier(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 TypeClassDescriptionclassSimplification of FuzzyLikeThisQuery, to be used in the context of KNN classification.Methods in org.apache.lucene.classification.utils that return QueryModifier and TypeMethodDescriptionprivate QueryNearestFuzzyQuery.newTermQuery(IndexReader reader, Term term) NearestFuzzyQuery.rewrite(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.document
Subclasses of Query in org.apache.lucene.documentModifier and TypeClassDescription(package private) classBase query class for ShapeDocValues queries.(package private) class(package private) class(package private) final class(package private) class(package private) class(package private) final classDistance query forLatLonDocValuesField.(package private) classFinds all previously indexed geo points that comply the givenShapeField.QueryRelationwith the specified array ofLatLonGeometry.(package private) final class(package private) final classDistance query forLatLonPoint.(package private) final classFinds all previously indexed geo points that comply the givenShapeField.QueryRelationwith the specified array ofLatLonGeometry.(package private) final classFinds all previously indexed geo shapes that intersect the specified bounding box.(package private) final classBounding Box query forShapeDocValuesFieldrepresentingXYShape(package private) final classFinds all previously indexed geo shapes that comply the givenShapeField.QueryRelationwith the specified array ofLatLonGeometry.(package private) final class(package private) classclassQuery class for searchingRangeFieldtypes by a definedPointValues.Relation.(package private) final class(package private) final classSimilar to SortedNumericDocValuesRangeQuery but for a set(package private) final class(package private) classclassXYGeometry query forXYDocValuesField.(package private) final classFinds all previously indexed points that fall within the specified XY geometries.(package private) final classBounding Box query forShapeDocValuesFieldrepresentingXYShape(package private) final classFinds all previously indexed cartesian shapes that comply the givenShapeField.QueryRelationwith the specified array ofXYGeometry.Methods in org.apache.lucene.document that return QueryModifier and TypeMethodDescriptionprivate static QueryLatLonPoint.makeContainsGeometryQuery(String field, LatLonGeometry... latLonGeometries) private static QueryLatLonShape.makeContainsGeometryQuery(String field, LatLonGeometry... latLonGeometries) private static QueryLatLonPoint.newBoxInternal(String field, byte[] min, byte[] max) static QueryLatLonPoint.newBoxQuery(String field, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) Create a query for matching a bounding box.static QueryLatLonShape.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 QueryXYPointField.newBoxQuery(String field, float minX, float maxX, float minY, float maxY) Create a query for matching a bounding box.static QueryXYShape.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 QueryDoubleRange.newContainsQuery(String field, double[] min, double[] max) Create a query for matching indexed ranges that contain the defined range.static QueryFloatRange.newContainsQuery(String field, float[] min, float[] max) Create a query for matching indexed float ranges that contain the defined range.static QueryInetAddressRange.newContainsQuery(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges thatCONTAINSthe defined range.static QueryIntRange.newContainsQuery(String field, int[] min, int[] max) Create a query for matching indexed ranges that contain the defined range.static QueryLongRange.newContainsQuery(String field, long[] min, long[] max) Create a query for matching indexed ranges that contain the defined range.static QueryDoubleRange.newCrossesQuery(String field, double[] min, double[] max) Create a query for matching indexed ranges that cross the defined range.static QueryFloatRange.newCrossesQuery(String field, float[] min, float[] max) Create a query for matching indexed ranges that cross the defined range.static QueryInetAddressRange.newCrossesQuery(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges thatCROSSthe defined range.static QueryIntRange.newCrossesQuery(String field, int[] min, int[] max) Create a query for matching indexed ranges that cross the defined range.static QueryLongRange.newCrossesQuery(String field, long[] min, long[] max) Create a query for matching indexed ranges that cross the defined range.static QueryLatLonPoint.newDistanceFeatureQuery(String field, float weight, double originLat, double originLon, double pivotDistanceMeters) Given a field that indexes point values into aLatLonPointand 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 QueryLongField.newDistanceFeatureQuery(String field, float weight, long origin, long pivotDistance) Returns a query that scores documents based on their distance toorigin:score = weight * pivotDistance / (pivotDistance + distance), ie.static QueryLongPoint.newDistanceFeatureQuery(String field, float weight, long origin, long pivotDistance) Deprecated.static QueryLatLonPoint.newDistanceQuery(String field, double latitude, double longitude, double radiusMeters) Create a query for matching points within the specified distance of the supplied location.static QueryLatLonShape.newDistanceQuery(String field, ShapeField.QueryRelation queryRelation, Circle... circle) create a query to find all polygons that intersect a provided circle.static QueryXYPointField.newDistanceQuery(String field, float x, float y, float radius) Create a query for matching points within the specified distance of the supplied location.static QueryXYShape.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 QueryBinaryPoint.newExactQuery(String field, byte[] value) Create a query for matching an exact binary value.static QueryDoubleField.newExactQuery(String field, double value) Create a query for matching an exact double value.static QueryDoublePoint.newExactQuery(String field, double value) Create a query for matching an exact double value.static QueryFloatField.newExactQuery(String field, float value) Create a query for matching an exact float value.static QueryFloatPoint.newExactQuery(String field, float value) Create a query for matching an exact float value.static QueryInetAddressPoint.newExactQuery(String field, InetAddress value) Create a query for matching a network address.static QueryIntField.newExactQuery(String field, int value) Create a query for matching an exact integer value.static QueryIntPoint.newExactQuery(String field, int value) Create a query for matching an exact integer value.static QueryKeywordField.newExactQuery(String field, String value) Create a query for matching an exactStringvalue.static QueryKeywordField.newExactQuery(String field, BytesRef value) Create a query for matching an exactBytesRefvalue.static QueryLongField.newExactQuery(String field, long value) Create a query for matching an exact long value.static QueryLongPoint.newExactQuery(String field, long value) Create a query for matching an exact long value.static QueryLatLonPoint.newGeometryQuery(String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries) Create a query for matching one or more geometries against the providedShapeField.QueryRelation.static QueryLatLonShape.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 QueryShapeDocValues.newGeometryQuery(String field, ShapeField.QueryRelation relation, Object... geometries) Creates a geometry query for shape docvaluesstatic QueryShapeDocValuesField.newGeometryQuery(String field, ShapeField.QueryRelation relation, Object... geometries) Creates a geometry query for shape docvaluesstatic QueryXYPointField.newGeometryQuery(String field, XYGeometry... xyGeometries) create a query to find all indexed shapes that intersect a provided geometry collection.static QueryXYShape.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 QueryDoubleRange.newIntersectsQuery(String field, double[] min, double[] max) Create a query for matching indexed ranges that intersect the defined range.static QueryFloatRange.newIntersectsQuery(String field, float[] min, float[] max) Create a query for matching indexed ranges that intersect the defined range.static QueryInetAddressRange.newIntersectsQuery(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges thatINTERSECTthe defined range.static QueryIntRange.newIntersectsQuery(String field, int[] min, int[] max) Create a query for matching indexed ranges that intersect the defined range.static QueryLongRange.newIntersectsQuery(String field, long[] min, long[] max) Create a query for matching indexed ranges that intersect the defined range.static QueryFeatureField.newLinearQuery(String fieldName, String featureName, float weight) Return a newQuerythat will score documents asweight * Swhere S is the value of the static feature.static QueryLatLonShape.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 QueryXYShape.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 QueryFeatureField.newLogQuery(String fieldName, String featureName, float weight, float scalingFactor) Return a newQuerythat will score documents asweight * Math.log(scalingFactor + S)where S is the value of the static feature.static QueryLatLonShape.newPointQuery(String field, ShapeField.QueryRelation queryRelation, double[]... points) create a query to find all indexed shapes that comply theShapeField.QueryRelationwith the provided pointsstatic QueryXYShape.newPointQuery(String field, ShapeField.QueryRelation queryRelation, float[]... points) create a query to find all indexed shapes that comply theShapeField.QueryRelationwith the provided pointstatic QueryLatLonPoint.newPolygonQuery(String field, Polygon... polygons) Create a query for matching one or more polygons.static QueryLatLonShape.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 QueryXYPointField.newPolygonQuery(String field, XYPolygon... polygons) Create a query for matching one or more polygons.static QueryXYShape.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 QueryInetAddressPoint.newPrefixQuery(String field, InetAddress value, int prefixLength) Create a prefix query for matching a CIDR network range.static QueryBinaryPoint.newRangeQuery(String field, byte[][] lowerValue, byte[][] upperValue) Create a range query for n-dimensional binary values.static QueryBinaryPoint.newRangeQuery(String field, byte[] lowerValue, byte[] upperValue) Create a range query for binary values.static QueryDoubleField.newRangeQuery(String field, double lowerValue, double upperValue) Create a range query for double values.static QueryDoublePoint.newRangeQuery(String field, double[] lowerValue, double[] upperValue) Create a range query for n-dimensional double values.static QueryDoublePoint.newRangeQuery(String field, double lowerValue, double upperValue) Create a range query for double values.static QueryFloatField.newRangeQuery(String field, float lowerValue, float upperValue) Create a range query for float values.static QueryFloatPoint.newRangeQuery(String field, float[] lowerValue, float[] upperValue) Create a range query for n-dimensional float values.static QueryFloatPoint.newRangeQuery(String field, float lowerValue, float upperValue) Create a range query for float values.static QueryInetAddressPoint.newRangeQuery(String field, InetAddress lowerValue, InetAddress upperValue) Create a range query for network addresses.static QueryIntField.newRangeQuery(String field, int lowerValue, int upperValue) Create a range query for integer values.static QueryIntPoint.newRangeQuery(String field, int[] lowerValue, int[] upperValue) Create a range query for n-dimensional integer values.static QueryIntPoint.newRangeQuery(String field, int lowerValue, int upperValue) Create a range query for integer values.static QueryLongField.newRangeQuery(String field, long lowerValue, long upperValue) Create a range query for long values.static QueryLongPoint.newRangeQuery(String field, long[] lowerValue, long[] upperValue) Create a range query for n-dimensional long values.static QueryLongPoint.newRangeQuery(String field, long lowerValue, long upperValue) Create a range query for long values.private static QueryDoubleRange.newRelationQuery(String field, double[] min, double[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static QueryFloatRange.newRelationQuery(String field, float[] min, float[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static QueryInetAddressRange.newRelationQuery(String field, InetAddress min, InetAddress max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static QueryIntRange.newRelationQuery(String field, int[] min, int[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational queryprivate static QueryLongRange.newRelationQuery(String field, long[] min, long[] max, RangeFieldQuery.QueryType relation) helper method for creating the desired relational querystatic QueryFeatureField.newSaturationQuery(String fieldName, String featureName) Same asFeatureField.newSaturationQuery(String, String, float, float)but1fis 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 QueryFeatureField.newSaturationQuery(String fieldName, String featureName, float weight, float pivot) Return a newQuerythat will score documents asweight * S / (S + pivot)where S is the value of the static feature.private static QueryFeatureField.newSaturationQuery(String fieldName, String featureName, float weight, Float pivot) static QueryBinaryPoint.newSetQuery(String field, byte[]... values) Create a query matching any of the specified 1D values.static QueryDoubleField.newSetQuery(String field, double... values) Create a query matching values in a supplied setstatic QueryDoublePoint.newSetQuery(String field, double... values) Create a query matching any of the specified 1D values.static QueryDoublePoint.newSetQuery(String field, Collection<Double> values) Create a query matching any of the specified 1D values.static QueryFloatField.newSetQuery(String field, float... values) Create a query matching values in a supplied setstatic QueryFloatPoint.newSetQuery(String field, float... values) Create a query matching any of the specified 1D values.static QueryFloatPoint.newSetQuery(String field, Collection<Float> values) Create a query matching any of the specified 1D values.static QueryInetAddressPoint.newSetQuery(String field, InetAddress... values) Create a query matching any of the specified 1D values.static QueryIntField.newSetQuery(String field, int... values) Create a query matching values in a supplied setstatic QueryIntPoint.newSetQuery(String field, int... values) Create a query matching any of the specified 1D values.static QueryIntPoint.newSetQuery(String field, Collection<Integer> values) Create a query matching any of the specified 1D values.static QueryKeywordField.newSetQuery(String field, Collection<BytesRef> values) Create a query for matching any of a set of providedBytesRefvalues.static QueryKeywordField.newSetQuery(String field, BytesRef... values) Deprecated, for removal: This API element is subject to removal in a future version.static QueryLongField.newSetQuery(String field, long... values) Create a query matching values in a supplied setstatic QueryLongPoint.newSetQuery(String field, long... values) Create a query matching any of the specified 1D values.static QueryLongPoint.newSetQuery(String field, Collection<Long> values) Create a query matching any of the specified 1D values.static QueryFeatureField.newSigmoidQuery(String fieldName, String featureName, float weight, float pivot, float exp) Return a newQuerythat will score documents asweight * S^a / (S^a + pivot^a)where S is the value of the static feature.static QueryLatLonDocValuesField.newSlowBoxQuery(String field, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) Create a query for matching a bounding box using doc values.static QueryXYDocValuesField.newSlowBoxQuery(String field, float minX, float maxX, float minY, float maxY) Create a query for matching a bounding box using doc values.static QueryLatLonDocValuesField.newSlowDistanceQuery(String field, double latitude, double longitude, double radiusMeters) Create a query for matching points within the specified distance of the supplied location.static QueryXYDocValuesField.newSlowDistanceQuery(String field, float x, float y, float radius) Create a query for matching points within the specified distance of the supplied location.static QueryLatLonShape.newSlowDocValuesBoxQuery(String field, ShapeField.QueryRelation queryRelation, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) create a docvalue query to find all geo shapes that intersect a defined bounding box *static QueryXYShape.newSlowDocValuesBoxQuery(String field, ShapeField.QueryRelation queryRelation, float minX, float maxX, float minY, float maxY) create a docvalue query to find all cartesian shapes that intersect a defined bounding box *static QueryNumericDocValuesField.newSlowExactQuery(String field, long value) Create a query for matching an exact long value.static QuerySortedDocValuesField.newSlowExactQuery(String field, BytesRef value) Create a query for matching an exactBytesRefvalue.static QuerySortedNumericDocValuesField.newSlowExactQuery(String field, long value) Create a query for matching an exact long value.static QuerySortedSetDocValuesField.newSlowExactQuery(String field, BytesRef value) Create a query for matching an exactBytesRefvalue.static QueryLatLonDocValuesField.newSlowGeometryQuery(String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries) Create a query for matching one or more geometries against the providedShapeField.QueryRelation.static QueryXYDocValuesField.newSlowGeometryQuery(String field, XYGeometry... geometries) Create a query for matching points within the supplied geometries.static QueryDoubleRangeDocValuesField.newSlowIntersectsQuery(String field, double[] min, double[] max) Create a new range query that finds all ranges that intersect using doc values.static QueryFloatRangeDocValuesField.newSlowIntersectsQuery(String field, float[] min, float[] max) Create a new range query that finds all ranges that intersect using doc values.static QueryIntRangeDocValuesField.newSlowIntersectsQuery(String field, int[] min, int[] max) Create a new range query that finds all ranges that intersect using doc values.static QueryLongRangeDocValuesField.newSlowIntersectsQuery(String field, long[] min, long[] max) Create a new range query that finds all ranges that intersect using doc values.static QueryLatLonDocValuesField.newSlowPolygonQuery(String field, Polygon... polygons) Create a query for matching points within the supplied polygons.static QueryXYDocValuesField.newSlowPolygonQuery(String field, XYPolygon... polygons) Create a query for matching points within the supplied polygons.private static QueryDoubleRangeDocValuesField.newSlowRangeQuery(String field, double[] min, double[] max, RangeFieldQuery.QueryType queryType) private static QueryFloatRangeDocValuesField.newSlowRangeQuery(String field, float[] min, float[] max, RangeFieldQuery.QueryType queryType) private static QueryIntRangeDocValuesField.newSlowRangeQuery(String field, int[] min, int[] max, RangeFieldQuery.QueryType queryType) private static QueryLongRangeDocValuesField.newSlowRangeQuery(String field, long[] min, long[] max, RangeFieldQuery.QueryType queryType) static QueryNumericDocValuesField.newSlowRangeQuery(String field, long lowerValue, long upperValue) Create a range query that matches all documents whose value is betweenlowerValueandupperValueincluded.static QuerySortedDocValuesField.newSlowRangeQuery(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive) Create a range query that matches all documents whose value is betweenlowerValueandupperValueincluded.static QuerySortedNumericDocValuesField.newSlowRangeQuery(String field, long lowerValue, long upperValue) Create a range query that matches all documents whose value is betweenlowerValueandupperValueincluded.static QuerySortedSetDocValuesField.newSlowRangeQuery(String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive) Create a range query that matches all documents whose value is betweenlowerValueandupperValue.static QueryNumericDocValuesField.newSlowSetQuery(String field, long... values) Create a query matching any of the specified values.static QuerySortedDocValuesField.newSlowSetQuery(String field, Collection<BytesRef> values) Create a query matching any of the specified values.static QuerySortedDocValuesField.newSlowSetQuery(String field, BytesRef... values) Deprecated, for removal: This API element is subject to removal in a future version.static QuerySortedNumericDocValuesField.newSlowSetQuery(String field, long... values) Create a query matching any of the specified values.static QuerySortedSetDocValuesField.newSlowSetQuery(String field, Collection<BytesRef> values) Create a query matching any of the specified values.static QuerySortedSetDocValuesField.newSlowSetQuery(String field, BytesRef... values) Deprecated, for removal: This API element is subject to removal in a future version.static QueryKnnByteVectorField.newVectorQuery(String field, byte[] queryVector, int k) Create a new vector query for the provided field targeting the byte vectorstatic QueryKnnFloatVectorField.newVectorQuery(String field, float[] queryVector, int k) Create a new vector query for the provided field targeting the float vectorstatic QueryDoubleRange.newWithinQuery(String field, double[] min, double[] max) Create a query for matching indexed ranges that are within the defined range.static QueryFloatRange.newWithinQuery(String field, float[] min, float[] max) Create a query for matching indexed ranges that are within the defined range.static QueryInetAddressRange.newWithinQuery(String field, InetAddress min, InetAddress max) Create a query for matching indexed ip ranges that areWITHINthe defined range.static QueryIntRange.newWithinQuery(String field, int[] min, int[] max) Create a query for matching indexed ranges that are within the defined range.static QueryLongRange.newWithinQuery(String field, long[] min, long[] max) Create a query for matching indexed ranges that are within the defined range.BinaryRangeFieldRangeQuery.rewrite(IndexSearcher indexSearcher) DoubleRangeSlowRangeQuery.rewrite(IndexSearcher indexSearcher) FeatureQuery.rewrite(IndexSearcher indexSearcher) FloatRangeSlowRangeQuery.rewrite(IndexSearcher indexSearcher) IntRangeSlowRangeQuery.rewrite(IndexSearcher indexSearcher) LongRangeSlowRangeQuery.rewrite(IndexSearcher indexSearcher) SortedNumericDocValuesRangeQuery.rewrite(IndexSearcher indexSearcher) SortedNumericDocValuesSetQuery.rewrite(IndexSearcher indexSearcher) SortedSetDocValuesRangeQuery.rewrite(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.index
Fields in org.apache.lucene.index declared as QueryModifier and TypeFieldDescription(package private) final Query[]FrozenBufferedUpdates.deleteQueriesFields in org.apache.lucene.index with type parameters of type QueryModifier and TypeFieldDescriptionBufferedUpdates.deleteQueriesSoftDeletesRetentionMergePolicy.retentionQuerySupplierMethods in org.apache.lucene.index that return types with arguments of type QueryModifier and TypeMethodDescription(package private) static DocumentsWriterDeleteQueue.Node<Query> Methods in org.apache.lucene.index with parameters of type QueryModifier and TypeMethodDescription(package private) longvoid(package private) static CodecReaderSoftDeletesRetentionMergePolicy.applyRetentionQuery(String softDeleteField, Query retentionQuery, CodecReader reader) longIndexWriter.deleteDocuments(Query... queries) Deletes the document(s) matching any of the provided queries.(package private) longDocumentsWriter.deleteQueries(Query... queries) private static ScorerSoftDeletesRetentionMergePolicy.getScorer(Query query, CodecReader reader) (package private) static DocumentsWriterDeleteQueue.Node<Query> longIndexWriter.updateDocuments(Query delQuery, Iterable<? extends Iterable<? extends IndexableField>> docs) Similar toIndexWriter.updateDocuments(Term, Iterable), but take a query instead of a term to identify the documents to be updatedConstructors 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 voidPKIndexSplitter.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.misc.search
Subclasses of Query in org.apache.lucene.misc.searchModifier and TypeClassDescriptionfinal classA simple query wrapper for debug purposes.Fields in org.apache.lucene.misc.search declared as QueryMethods in org.apache.lucene.misc.search that return QueryModifier and TypeMethodDescriptionHumanReadableQuery.getWrappedQuery()HumanReadableQuery.rewrite(IndexSearcher indexSearcher) Constructors in org.apache.lucene.misc.search with parameters of type QueryModifierConstructorDescriptionHumanReadableQuery(Query in, String description) Create a new HumanReadableQuery -
Uses of Query in org.apache.lucene.monitor
Subclasses of Query in org.apache.lucene.monitorModifier and TypeClassDescription(package private) classQuery 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 QueryForceNoBulkScoringQuery.inner(package private) final QueryParallelMatcher.MatcherTask.matchQuery(package private) final QueryPartitionMatcher.MatchTask.matchQuery(package private) final QueryQueryCacheEntry.matchQueryThe (possibly partial due to decomposition) queryprivate final QueryMonitorQuery.queryFields in org.apache.lucene.monitor with type parameters of type QueryModifier and TypeFieldDescriptionprivate final BiFunction<Query, TermWeightor, QueryTree> QueryAnalyzer.unknownQueryMapperMethods in org.apache.lucene.monitor that return QueryModifier and TypeMethodDescriptionMultipassTermFilteredPresearcher.MultipassDocumentQueryBuilder.build()TermFilteredPresearcher.DocumentQueryBuilder.build()private QueryTermFilteredPresearcher.buildFilterClause(LeafReader reader, String field) private QueryTermFilteredPresearcher.buildFilterFields(LeafReader reader) abstract QueryPresearcher.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 QueryTermFilteredPresearcher.buildQuery(LeafReader reader, BiPredicate<String, BytesRef> termAcceptor) MonitorQuery.getQuery()ForceNoBulkScoringQuery.getWrappedQuery()ForceNoBulkScoringQuery.rewrite(IndexSearcher indexSearcher) 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 aBooleanQueryQueryDecomposer.decomposeBoostQuery(BoostQuery q) Methods in org.apache.lucene.monitor with parameters of type QueryModifier and TypeMethodDescription(package private) QueryTreeQueryAnalyzer.buildTree(Query luceneQuery, TermWeightor weightor) Create aQueryTreefrom a passed in Query or FiltervoidQueryAnalyzer.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 aQueryTreenode from a queryRegexpQueryHandler.handleQuery(Query q, TermWeightor termWeightor) abstract DocumentPresearcher.indexQuery(Query query, Map<String, String> metadata) Build a lucene Document to index the query in a Monitor's queryindexfinal DocumentTermFilteredPresearcher.indexQuery(Query query, Map<String, String> metadata) protected abstract voidRuns the supplied query against this CandidateMatcher's set of documents, storing any resulting match, and recording the query in the presearcher hitsprotected voidprotected voidprotected void(package private) longQueryIndex.search(Query query, QueryIndex.QueryCollector matcher) voidMethod parameters in org.apache.lucene.monitor with type arguments of type QueryModifier and TypeMethodDescriptionstatic MonitorQuerySerializerMonitorQuerySerializer.fromParser(Function<String, Query> parser) Build a serializer from a query parserConstructors in org.apache.lucene.monitor with parameters of type QueryModifierConstructorDescriptionForceNoBulkScoringQuery(Query inner) privateprivateMonitorQuery(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 voidPayloadSpanUtil.queryToSpanQuery(Query query, Collection<byte[]> payloads) -
Uses of Query in org.apache.lucene.queries
Subclasses of Query in org.apache.lucene.queriesModifier and TypeClassDescriptionclassA 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 QueryCommonTermsQuery.buildQuery(int maxDoc, TermStates[] contextArray, Term[] queryTerms) protected QueryCommonTermsQuery.newTermQuery(Term term, TermStates termStates) Builds a new TermQuery instance.CommonTermsQuery.rewrite(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.queries.function
Subclasses of Query in org.apache.lucene.queries.functionModifier and TypeClassDescriptionfinal classA query that retrieves all documents with aDoubleValuesvalue matching a predicateclassReturns a score for each document based on a ValueSource, often some function of the value of a field.classA Query wrapping aValueSourcethat matches docs in which the values in the value source match a configured range.final classA 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(IndexSearcher indexSearcher) Methods in org.apache.lucene.queries.function with parameters of type QueryModifier and TypeMethodDescriptionstatic FunctionScoreQueryFunctionScoreQuery.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 FunctionScoreQueryFunctionScoreQuery.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 QueryQueryDocValues.q(package private) final QueryQueryValueSource.qMethods 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 classA query that retrieves documents containing intervals returned from anIntervalsSourceFields 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 TypeClassDescriptionclassA 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 QueryMoreLikeThis.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(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.queries.payloads
Subclasses of Query in org.apache.lucene.queries.payloadsModifier and TypeClassDescriptionclassA Query class that uses aPayloadFunctionto modify the score of a wrapped SpanQueryclassOnly 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(IndexSearcher indexSearcher) SpanPayloadCheckQuery.rewrite(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.queries.spans
Subclasses of Query in org.apache.lucene.queries.spansModifier and TypeClassDescriptionfinal classWrapper to allowSpanQueryobjects participate in composite single-field SpanQueries by 'lying' about their search field.final classKeep matches that contain another SpanScorer.(package private) classclassMatches spans near the beginning of a field.classSpanMultiTermQueryWrapper<Q extends MultiTermQuery>Wraps anyMultiTermQueryas aSpanQuery, so it can be nested within other SpanQuery classes.classMatches spans which are near one another.private static classfinal classRemoves matches which overlap with another SpanQuery or which are within x tokens before or y tokens after another SpanQuery.final classMatches the union of its clauses.classBase class for filtering a SpanQuery based on the position of a match.classChecks to see if theSpanPositionCheckQuery.getMatch()lies between a start and end positionclassBase class for span-based queries.classMatches spans containing a term.final classKeep 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(IndexSearcher indexSearcher) SpanContainQuery.rewrite(IndexSearcher indexSearcher) SpanMultiTermQueryWrapper.rewrite(IndexSearcher indexSearcher) SpanNearQuery.rewrite(IndexSearcher indexSearcher) SpanNotQuery.rewrite(IndexSearcher indexSearcher) SpanOrQuery.rewrite(IndexSearcher indexSearcher) SpanPositionCheckQuery.rewrite(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.queryparser.classic
Methods in org.apache.lucene.queryparser.classic that return QueryModifier and TypeMethodDescriptionprivate QueryMultiFieldQueryParser.applyBoost(Query q, String field) private Queryfinal Queryprotected QueryQueryParserBase.getBooleanQuery(List<BooleanClause> clauses) Factory method for generating query, given a set of clauses.protected QueryMultiFieldQueryParser.getFieldQuery(String field, String queryText, boolean quoted) protected QueryMultiFieldQueryParser.getFieldQuery(String field, String queryText, int slop) protected QueryQueryParserBase.getFieldQuery(String field, String queryText, boolean quoted) protected QueryQueryParserBase.getFieldQuery(String field, String queryText, int slop) Base implementation delegates toQueryParserBase.getFieldQuery(String,String,boolean).protected QueryMultiFieldQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity) protected QueryQueryParserBase.getFuzzyQuery(String field, String termStr, float minSimilarity) Factory method for generating a query (similar toQueryParserBase.getWildcardQuery(java.lang.String, java.lang.String)).protected QueryMultiFieldQueryParser.getMultiFieldQuery(List<Query> queries) Creates a multifield queryprotected QueryMultiFieldQueryParser.getPrefixQuery(String field, String termStr) protected QueryQueryParserBase.getPrefixQuery(String field, String termStr) Factory method for generating a query (similar toQueryParserBase.getWildcardQuery(java.lang.String, java.lang.String)).protected QueryMultiFieldQueryParser.getRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected QueryQueryParserBase.getRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected QueryMultiFieldQueryParser.getRegexpQuery(String field, String termStr) protected QueryQueryParserBase.getRegexpQuery(String field, String termStr) Factory method for generating a query.protected QueryMultiFieldQueryParser.getWildcardQuery(String field, String termStr) protected QueryQueryParserBase.getWildcardQuery(String field, String termStr) Factory method for generating a query.(package private) QueryQueryParserBase.handleBareFuzzy(String qfield, Token fuzzySlop, String termImage) (package private) QueryQueryParserBase.handleBareTokenQuery(String qfield, Token term, Token fuzzySlop, boolean prefix, boolean wildcard, boolean fuzzy, boolean regexp) (package private) QueryQueryParserBase.handleBoost(Query q, Token boost) (package private) QueryQueryParserBase.handleQuotedTerm(String qfield, Token term, Token fuzzySlop) final QueryQueryParser.MultiTerm(String field, List<BooleanClause> clauses) Returns the first query if splitOnWhitespace=true or otherwise the entire produced queryprotected QueryQueryParserBase.newFieldQuery(Analyzer analyzer, String field, String queryText, boolean quoted) protected QueryQueryParserBase.newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength) Builds a new FuzzyQuery instanceprotected QueryQueryParserBase.newMatchAllDocsQuery()Builds a new MatchAllDocsQuery instanceprotected QueryQueryParserBase.newPrefixQuery(Term prefix) Builds a new PrefixQuery instanceprotected QueryQueryParserBase.newRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) Builds a newTermRangeQueryinstanceprotected QueryQueryParserBase.newRegexpQuery(Term regexp) Builds a new RegexpQuery instanceprotected QueryQueryParserBase.newWildcardQuery(Term t) Builds a new WildcardQuery instancestatic QueryParses a query which searches on the fields specified.static QueryMultiFieldQueryParser.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.static QueryMultiFieldQueryParser.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 Queryfinal Queryfinal QueryQueryParser.TopLevelQuery(String field) abstract QueryQueryParserBase.TopLevelQuery(String field) Methods in org.apache.lucene.queryparser.classic with parameters of type QueryModifier and TypeMethodDescriptionprotected voidQueryParserBase.addClause(List<BooleanClause> clauses, int conj, int mods, Query q) protected voidQueryParserBase.addMultiTermClauses(List<BooleanClause> clauses, Query q) Adds clauses generated from analysis over text containing whitespace.private QueryMultiFieldQueryParser.applyBoost(Query q, String field) private Query(package private) QueryQueryParserBase.handleBoost(Query q, Token boost) protected BooleanClauseQueryParserBase.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 QueryMultiFieldQueryParser.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 classFields in org.apache.lucene.queryparser.complexPhrase declared as QueryModifier and TypeFieldDescriptionprivate final Query[]ComplexPhraseQueryParser.ComplexPhraseQuery.contentsMethods in org.apache.lucene.queryparser.complexPhrase that return QueryModifier and TypeMethodDescriptionprotected QueryComplexPhraseQueryParser.getFieldQuery(String field, String queryText, int slop) protected QueryComplexPhraseQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity) protected QueryComplexPhraseQueryParser.getRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected QueryComplexPhraseQueryParser.getWildcardQuery(String field, String termStr) protected QueryComplexPhraseQueryParser.newRangeQuery(String field, String part1, String part2, boolean startInclusive, boolean endInclusive) protected QueryComplexPhraseQueryParser.newTermQuery(Term term, float boost) ComplexPhraseQueryParser.ComplexPhraseQuery.rewrite(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.queryparser.ext
Methods in org.apache.lucene.queryparser.ext that return QueryModifier and TypeMethodDescriptionprotected QueryExtendableQueryParser.getFieldQuery(String field, String queryText, boolean quoted) abstract QueryParserExtension.parse(ExtensionQuery query) Processes the givenExtensionQueryand returns a correspondingQueryinstance. -
Uses of Query in org.apache.lucene.queryparser.flexible.standard
Methods in org.apache.lucene.queryparser.flexible.standard that return QueryModifier and TypeMethodDescriptionstatic QueryParses a query which searches on the fields specified.static QueryQueryParserUtil.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.static QueryQueryParserUtil.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 QuerySimpleQueryParser.newDefaultQuery(String text) Factory method to generate a standard query (no phrase or prefix operators).protected QuerySimpleQueryParser.newFuzzyQuery(String text, int fuzziness) Factory method to generate a fuzzy query.protected QuerySimpleQueryParser.newPhraseQuery(String text, int slop) Factory method to generate a phrase query with slop.protected QuerySimpleQueryParser.newPrefixQuery(String text) Factory method to generate a prefix query.Parses the query text and returns parsed queryprotected QuerySimpleQueryParser.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 BooleanQuerySimpleQueryParser.addClause(BooleanQuery bq, Query query, BooleanClause.Occur occur) private voidSimpleQueryParser.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) classRewriteQuery<SQ extends SrndQuery>(package private) classMethods in org.apache.lucene.queryparser.surround.query that return QueryModifier and TypeMethodDescriptionDistanceQuery.getSpanNearQuery(IndexReader reader, String fieldName, BasicQueryFactory qf) static QuerySrndBooleanQuery.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 QuerySrndQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf) FieldsQuery.makeLuceneQueryNoBoost(BasicQueryFactory qf) DistanceRewriteQuery.rewrite(IndexSearcher indexSearcher) abstract QueryRewriteQuery.rewrite(IndexSearcher indexSearcher) SimpleTermRewriteQuery.rewrite(IndexSearcher indexSearcher) 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 voidSrndBooleanQuery.addQueriesToBoolean(BooleanQuery.Builder bq, List<Query> queries, BooleanClause.Occur occur) static QuerySrndBooleanQuery.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 QueryLatLonBoundingBox.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 QueryLatLonBoundingBox.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 QueryBigIntegerPoint.newExactQuery(String field, BigInteger value) Create a query for matching an exact big integer value.static QueryHalfFloatPoint.newExactQuery(String field, float value) Create a query for matching an exact half-float value.static QueryLatLonBoundingBox.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 QueryBigIntegerPoint.newRangeQuery(String field, BigInteger[] lowerValue, BigInteger[] upperValue) Create a range query for n-dimensional big integer values.static QueryBigIntegerPoint.newRangeQuery(String field, BigInteger lowerValue, BigInteger upperValue) Create a range query for big integer values.static QueryHalfFloatPoint.newRangeQuery(String field, float[] lowerValue, float[] upperValue) Create a range query for n-dimensional half-float values.static QueryHalfFloatPoint.newRangeQuery(String field, float lowerValue, float upperValue) Create a range query for half-float values.private static QueryLatLonBoundingBox.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 QueryBigIntegerPoint.newSetQuery(String field, BigInteger... values) Create a query matching any of the specified 1D values.static QueryHalfFloatPoint.newSetQuery(String field, float... values) Create a query matching any of the specified 1D values.static QueryHalfFloatPoint.newSetQuery(String field, Collection<Float> values) Create a query matching any of the specified 1D values.static QueryLatLonBoundingBox.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 TypeClassDescriptionclassFuzzifies 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 QueryFuzzyLikeThisQuery.newTermQuery(IndexReader reader, Term term) FuzzyLikeThisQuery.rewrite(IndexSearcher indexSearcher) -
Uses of Query in org.apache.lucene.sandbox.search
Subclasses of Query in org.apache.lucene.sandbox.searchModifier and TypeClassDescriptionfinal classAQuerythat 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 classAQuerythat allows to have a configurable number or required matches per document.classAbstract class for range queries involving multiple ranges against physical points such asIntPointsAll ranges are logically ORed togetherclassA generalized version ofPhraseQuery, built with one or moreMultiTermQuerythat provides term expansions for multi-terms (one of the expanded terms must match).classA proximity query that lets you express an automaton, whose transitions are terms, to match documents.Fields in org.apache.lucene.sandbox.search declared as QueryFields in org.apache.lucene.sandbox.search with type parameters of type QueryModifier and TypeFieldDescriptionprivate final Collection<Query> CoveringQuery.queriesQueryProfilerTree.queriesA list of the original queries, keyed by index positionMethods in org.apache.lucene.sandbox.search that return QueryModifier and TypeMethodDescriptionprotected QueryPhraseWildcardQuery.MultiTerm.getQuery()protected abstract QueryPhraseWildcardQuery.PhraseTerm.getQuery()protected QueryPhraseWildcardQuery.SingleTerm.getQuery()CombinedFieldQuery.rewrite(IndexSearcher indexSearcher) CoveringQuery.rewrite(IndexSearcher indexSearcher) MultiRangeQuery.rewrite(IndexSearcher indexSearcher) Merges the overlapping ranges and returns unconnected ranges by callingMultiRangeQuery.mergeOverlappingRanges(java.util.List<org.apache.lucene.sandbox.search.MultiRangeQuery.RangeClause>, int)PhraseWildcardQuery.rewrite(IndexSearcher indexSearcher) TermAutomatonQuery.rewrite(IndexSearcher indexSearcher) Methods in org.apache.lucene.sandbox.search with parameters of type QueryModifier and TypeMethodDescriptionprivate QueryProfilerBreakdownQueryProfilerTree.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 StringQueryProfilerTree.getDescriptionFromQuery(Query query) QueryProfilerTree.getProfileBreakdown(Query query) Returns aQueryProfilerBreakdownfor a scoring query.private StringQueryProfilerTree.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) 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 TypeClassDescription(package private) classUsesKnnVectorsReader.search(java.lang.String, float[], org.apache.lucene.search.KnnCollector, org.apache.lucene.util.Bits)to perform nearest neighbour search.(package private) static classCaches the results of a KnnVector search: a list of docs and their scores(package private) classContains functionality common to bothMultiTermQueryConstantScoreBlendedWrapperandMultiTermQueryConstantScoreWrapper.(package private) classSearch for all (approximate) vectors above a similarity threshold.classAQuerythat will match terms against a finite-state machine.final classAQuerythat blends index statistics across multiple terms.classA Query that matches documents matching boolean combinations of other queries, e.g.final classAQuerywrapper that allows to give a boost to the wrapped query.classSearch for all (approximate) byte vectors above a similarity threshold.final classA query that wraps another query and simply returns a constant score equal to 1 for every document that matches the query.final classA 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 classDeprecated.UseFieldExistsQueryinstead.(package private) static classclassAQuerythat matches documents that contain either aKnnFloatVectorField,KnnByteVectorFieldor a field that indexes norms or doc values.classSearch for all (approximate) float vectors above a similarity threshold.classImplements the fuzzy search query.final classA 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.classA range query that can take advantage of the fact that the index is sorted to speed up execution.classA Query that matches documents matching combinations of subqueries.classA Basic abstract query that all IndriQueries can extend to implement toString, equals, getClauses, and iterator.classUsesKnnVectorsReader.search(String, byte[], KnnCollector, Bits)to perform nearest neighbour search.classUsesKnnVectorsReader.search(String, float[], KnnCollector, Bits)to perform nearest neighbour search.classDeprecated.UseFieldExistsQueryinstead.classDeprecated.useKnnFloatVectorQueryinsteadfinal classA query that matches all documents.classA query that matches no documents.classA generalized version ofPhraseQuery, with the possibility of adding more than one term at the same position that are treated as a disjunction (OR).classAn abstractQuerythat matches documents containing a subset of terms provided by aFilteredTermsEnumenumeration.(package private) final classThis class provides the functionality behindMultiTermQuery.CONSTANT_SCORE_BLENDED_REWRITE.(package private) final classMultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery>This class provides the functionality behindMultiTermQuery.CONSTANT_SCORE_REWRITE.private static classclassThis is aPhraseQuerywhich is optimized for n-gram phrase query.final classDeprecated.UseFieldExistsQueryinstead.classA Query that matches documents containing a particular sequence of terms.classAbstract query class to find all documents whose single or multi-dimensional point values, previously indexed with e.g.classAbstract class for range queries against single or multidimensional points such asIntPoint.classA Query that matches documents containing terms with a specified prefix.classA fast regular expression query based on theorg.apache.lucene.util.automatonpackage.final classA query that treats multiple terms as synonyms.classSpecialization for a disjunction over many terms that, by default, behaves like aConstantScoreQueryover aBooleanQuerycontaining onlyBooleanClause.Occur.SHOULDclauses.classA Query that matches documents containing a term.classA Query that matches documents within an range of terms.classImplements the wildcard search query.Fields in org.apache.lucene.search declared as QueryModifier and TypeFieldDescriptionprivate final QueryIndexOrDocValuesQuery.dvQueryprivate final QueryIndexSortSortedNumericDocValuesRangeQuery.fallbackQueryprivate final QueryAbstractKnnVectorQuery.filterprotected final QueryAbstractVectorSimilarityQuery.filterprivate final QueryNamedMatches.NamedQuery.inprivate final QueryIndexOrDocValuesQuery.indexQueryprotected final QueryWeight.parentQueryprivate final QueryBooleanClause.queryThe query whose matching documents are combined by the boolean query.private final QueryBoostQuery.queryprivate final QueryConstantScoreQuery.queryprivate final QueryDisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator.queryprivate final QueryDoubleValuesSource.QueryDoubleValuesSource.queryprivate final QueryQueryRescorer.queryprivate final QueryTermMatchesIterator.queryFields in org.apache.lucene.search with type parameters of type QueryModifier and TypeFieldDescriptionprivate final Map<Query, LRUQueryCache.CacheAndCount> LRUQueryCache.LeafCache.cacheprivate final Map<BooleanClause.Occur, Collection<Query>> BooleanQuery.clauseSetsDisjunctionMaxQuery.disjunctsLRUQueryCache.mostRecentlyUsedQueriesprivate static final VirtualMethod<Query> Query.newMethodprivate static final VirtualMethod<Query> Query.oldMethodLRUQueryCache.uniqueQueriesLRUQueryCache.uniqueQueriesMethods in org.apache.lucene.search that return QueryModifier and TypeMethodDescriptionprotected QueryMultiTermQuery.TopTermsBlendedFreqScoringRewrite.build(BlendedTermQuery.Builder builder) protected QueryMultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.build(BooleanQuery.Builder builder) protected QueryMultiTermQuery.TopTermsScoringBooleanQueryRewrite.build(BooleanQuery.Builder builder) protected abstract QueryFinalize the creation of the query from the builder.private QueryAbstractKnnVectorQuery.createRewrittenQuery(IndexReader reader, TopDocs topK) IndexSortSortedNumericDocValuesRangeQuery.getFallbackQuery()AbstractKnnVectorQuery.getFilter()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 QueryWeight.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.AbstractKnnVectorQuery.rewrite(IndexSearcher indexSearcher) final QueryBlendedTermQuery.rewrite(IndexSearcher indexSearcher) abstract QueryMerge the provided sub queries into a singleQueryobject.BooleanQuery.rewrite(IndexSearcher indexSearcher) BoostQuery.rewrite(IndexSearcher indexSearcher) ConstantScoreQuery.rewrite(IndexSearcher indexSearcher) DisjunctionMaxQuery.rewrite(IndexSearcher indexSearcher) Optimize our representation and our subqueries representationsDocValuesRewriteMethod.rewrite(IndexReader reader, MultiTermQuery query) FieldExistsQuery.rewrite(IndexSearcher indexSearcher) IndexOrDocValuesQuery.rewrite(IndexSearcher indexSearcher) Expert: called to re-write queries into primitive queries.private QueryIndexSortSortedNumericDocValuesRangeQuery.rewrite(IndexSearcher indexSearcher) MultiPhraseQuery.rewrite(IndexSearcher indexSearcher) final QueryMultiTermQuery.rewrite(IndexSearcher indexSearcher) To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getTermsEnum(Terms, AttributeSource).abstract QueryMultiTermQuery.RewriteMethod.rewrite(IndexReader reader, MultiTermQuery query) NamedMatches.NamedQuery.rewrite(IndexSearcher indexSearcher) NGramPhraseQuery.rewrite(IndexSearcher indexSearcher) PhraseQuery.rewrite(IndexSearcher indexSearcher) Query.rewrite(IndexReader reader) Deprecated.Query.rewrite(IndexSearcher indexSearcher) Expert: called to re-write queries into primitive queries.final QueryScoringRewrite.rewrite(IndexReader reader, MultiTermQuery query) SynonymQuery.rewrite(IndexSearcher indexSearcher) final QueryTopTermsRewrite.rewrite(IndexReader reader, MultiTermQuery query) (package private) Query[]BooleanQuery.rewriteTwoClauseDisjunctionWithTermsForCount(IndexSearcher indexSearcher) Rewrite a single two clause disjunction query with terms to two term queries and a conjunction query using the inclusion–exclusion principle.static QueryWrap a Query so that it associates a name with itsMatchesMethods 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.voidLRUQueryCache.clearQuery(Query query) Remove all cache entries for the given query.voidQueryVisitor.consumeTerms(Query query, Term... terms) Called by leaf queries that match on specific termsvoidQueryVisitor.consumeTermsMatching(Query query, String field, Supplier<ByteRunAutomaton> automaton) Called by leaf queries that match on a class of termsintCount how many documents match the given query.IndexSearcher.createWeight(Query query, ScoreMode scoreMode, float boost) Creates aWeightfor the given query, potentially adding caching if possible and configured.static MatchesIteratorMatchesUtils.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 howdocscored againstquery.(package private) intstatic DoubleValuesSourceCreate a DoubleValuesSource that returns the score of a particular query(package private) static MatchesIteratorDisjunctionMatchesIterator.fromTerms(LeafReaderContext context, int doc, Query query, String field, List<Term> terms) Create aDisjunctionMatchesIteratorover a list of terms(package private) static MatchesIteratorDisjunctionMatchesIterator.fromTermsEnum(LeafReaderContext context, int doc, Query query, String field, BytesRefIterator terms) Create aDisjunctionMatchesIteratorover a list of terms extracted from aBytesRefIterator(package private) LRUQueryCache.CacheAndCountLRUQueryCache.get(Query key, IndexReader.CacheHelper cacheHelper) (package private) LRUQueryCache.CacheAndCountprivate static longLRUQueryCache.getRamBytesUsed(Query query) QueryVisitor.getSubVisitor(BooleanClause.Occur occur, Query parent) Pulls a visitor instance for visiting child clauses of a query(package private) static booleanprivate static booleanUsageTrackingQueryCachingPolicy.isPointQuery(Query query) protected intUsageTrackingQueryCachingPolicy.minFrequencyToCache(Query query) For a given filter, return how many times it should appear in the history before being cached.private voidLRUQueryCache.onEviction(Query singleton) protected voidExpert: callback when there is a cache hit on a given query.protected voidExpert: callback when there is a cache miss on a given query.protected voidLRUQueryCache.onQueryCache(Query query, long ramBytesUsed) Expert: callback when a query is added to this cache.protected voidLRUQueryCache.onQueryEviction(Query query, long ramBytesUsed) Expert: callback when a query is evicted from this cache.voidCallback that is called every time that a cached filter is used.voidstatic voidTopFieldCollector.populateScores(ScoreDoc[] topDocs, IndexSearcher searcher, Query query) Populatescoresof the giventopDocs.(package private) voidLRUQueryCache.LeafCache.putIfAbsent(Query query, LRUQueryCache.CacheAndCount cached) private voidLRUQueryCache.putIfAbsent(Query query, LRUQueryCache.CacheAndCount cached, IndexReader.CacheHelper cacheHelper) (package private) voidstatic TopDocsQueryRescorer.rescore(IndexSearcher searcher, TopDocs topDocs, Query query, double weight, int topN) Sugar API, calling {#rescore} using a simple linear combination of firstPassScore + weight * secondPassScoreabstract QueryMerge the provided sub queries into a singleQueryobject.Expert: called to re-write queries into primitive queries.private QueryFinds the topnhits forquery.Search implementation with arbitrary sorting.Search implementation with arbitrary sorting, plus control over whether hit scores and max score should be computed.voidDeprecated.This method is being deprecated in favor ofIndexSearcher.search(Query, CollectorManager)due to its support for concurrency in IndexSearcher<C extends Collector,T>
TIndexSearcher.search(Query query, CollectorManager<C, T> collectorManager) Lower-level search API.private TopFieldDocsIndexSearcher.searchAfter(FieldDoc after, Query query, int numHits, Sort sort, boolean doDocScores) IndexSearcher.searchAfter(ScoreDoc after, Query query, int numHits) Finds the topnhits forquerywhere all results are after a previous result (after).IndexSearcher.searchAfter(ScoreDoc after, Query query, int n, Sort sort) Finds the topnhits forquerywhere all results are after a previous result (after).IndexSearcher.searchAfter(ScoreDoc after, Query query, int numHits, Sort sort, boolean doDocScores) Finds the topnhits forquerywhere all results are after a previous result (after), allowing control over whether hit scores and max score should be computed.booleanQueryCachingPolicy.shouldCache(Query query) Whether the givenQueryis worth caching.booleanUsageTrackingQueryCachingPolicy.shouldCache(Query query) private static booleanUsageTrackingQueryCachingPolicy.shouldNeverCache(Query query) voidCalled by leaf queries that do not match on termsstatic QueryWrap a Query so that it associates a name with itsMatchesConstructors in org.apache.lucene.search with parameters of type QueryModifierConstructorDescriptionAbstractKnnVectorQuery(String field, int k, Query filter) (package private)AbstractVectorSimilarityQuery(String field, float traversalSimilarity, float resultSimilarity, Query filter) Search for all (approximate) vectors above a similarity threshold usingVectorSimilarityCollector.BooleanClause(Query query, BooleanClause.Occur occur) Constructs a BooleanClause.BoostQuery(Query query, float boost) Sole constructor: wrapqueryin such a way that the produced scores will be boosted byboost.ByteVectorSimilarityQuery(String field, byte[] target, float traversalSimilarity, float resultSimilarity, Query filter) Search for all (approximate) byte vectors above a similarity threshold usingVectorSimilarityCollector.ByteVectorSimilarityQuery(String field, byte[] target, float resultSimilarity, Query filter) Search for all (approximate) byte vectors above a similarity threshold usingVectorSimilarityCollector.ConstantScoreQuery(Query query) Strips off scores from the passed in Query.protectedConstantScoreWeight(Query query, float score) protectedFilterWeight(Query query, Weight weight) Alternative constructor.FloatVectorSimilarityQuery(String field, float[] target, float traversalSimilarity, float resultSimilarity, Query filter) Search for all (approximate) float vectors above a similarity threshold usingVectorSimilarityCollector.FloatVectorSimilarityQuery(String field, float[] target, float resultSimilarity, Query filter) Search for all (approximate) float vectors above a similarity threshold usingVectorSimilarityCollector.IndexOrDocValuesQuery(Query indexQuery, Query dvQuery) Create anIndexOrDocValuesQuery.IndexSortSortedNumericDocValuesRangeQuery(String field, long lowerValue, long upperValue, Query fallbackQuery) Creates a newIndexSortSortedNumericDocValuesRangeQuery.KnnByteVectorQuery(String field, byte[] target, int k, Query filter) Find theknearest documents to the target vector according to the vectors in the given field.KnnFloatVectorQuery(String field, float[] target, int k, Query filter) Find theknearest documents to the target vector according to the vectors in the given field.KnnVectorQuery(String field, float[] target, int k, Query filter) Deprecated.privateNamedQuery(String name, Query in) protectedPhraseWeight(Query query, String field, IndexSearcher searcher, ScoreMode scoreMode) Expert: Creates PhraseWeight instanceprivateQueryDoubleValuesSource(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 newTermMatchesIteratorfor the given term and postings list(package private)TermsEnumDisjunctionMatchesIterator(MatchesIterator first, BytesRefIterator terms, TermsEnum te, int doc, Query query) protectedSole 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 TopGroupsGroupingSearch.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 QueryModifierConstructorDescriptionprivateGroupingSearch(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 TypeMethodDescriptionvoidQueryTermExtractor.BoostedTermExtractor.consumeTerms(Query query, Term... terms) protected voidWeightedSpanTermExtractor.extract(Query query, float boost, Map<String, WeightedSpanTerm> terms) protected voidWeightedSpanTermExtractor.extractUnknownQuery(Query query, Map<String, WeightedSpanTerm> terms) protected voidWeightedSpanTermExtractor.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 ofWeightedSpanTermsfrom the givenQueryandTokenStream.WeightedSpanTermExtractor.getWeightedSpanTerms(Query query, float boost, TokenStream tokenStream, String fieldName) Creates a Map ofWeightedSpanTermsfrom the givenQueryandTokenStream.WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query, float boost, TokenStream tokenStream, String fieldName, IndexReader reader) Creates a Map ofWeightedSpanTermsfrom the givenQueryandTokenStream.private voidQueryScorer.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 booleanWeightedSpanTermExtractor.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 TypeClassDescriptionclasskNN byte vector query that joins matching children vector documents with their parent doc id.classkNN float vector query that joins matching children vector documents with their parent doc id.(package private) final class(package private) final classclassA 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) classA query that has an array of terms from a specific field.classJust likeToParentBlockJoinQuery, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.classThis 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 QueryDiversifyingChildrenByteKnnVectorQuery.childFilterprivate final QueryDiversifyingChildrenFloatKnnVectorQuery.childFilterprivate final QueryParentChildrenBlockJoinQuery.childQueryprivate final QueryToParentBlockJoinQuery.childQueryprivate final QueryGlobalOrdinalsQuery.fromQueryprivate final QueryGlobalOrdinalsWithScoreQuery.fromQueryprivate final QueryTermsIncludingScoreQuery.fromQueryprivate final QueryTermsQuery.fromQuery(package private) final QueryPointInSetIncludingScoreQuery.originalQueryprivate final QueryToChildBlockJoinQuery.parentQueryprivate final QueryQueryBitSetProducer.queryprivate final QueryGlobalOrdinalsQuery.toQueryprivate final QueryGlobalOrdinalsWithScoreQuery.toQueryMethods in org.apache.lucene.search.join that return QueryModifier and TypeMethodDescriptionprivate static QueryJoinUtil.createJoinQuery(boolean multipleValuesPerDocument, String toField, Query fromQuery, String fromField, IndexSearcher fromSearcher, ScoreMode scoreMode, GenericTermsCollector collector) static QueryJoinUtil.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 QueryJoinUtil.createJoinQuery(String fromField, boolean multipleValuesPerDocument, String toField, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode) Method for query time joining.static QueryJoinUtil.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 QueryJoinUtil.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(IndexSearcher indexSearcher) ToChildBlockJoinQuery.rewrite(IndexSearcher indexSearcher) ToParentBlockJoinQuery.rewrite(IndexSearcher indexSearcher) Methods in org.apache.lucene.search.join with parameters of type QueryModifier and TypeMethodDescriptionprivate static QueryJoinUtil.createJoinQuery(boolean multipleValuesPerDocument, String toField, Query fromQuery, String fromField, IndexSearcher fromSearcher, ScoreMode scoreMode, GenericTermsCollector collector) static QueryJoinUtil.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 QueryJoinUtil.createJoinQuery(String fromField, boolean multipleValuesPerDocument, String toField, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode) Method for query time joining.static QueryJoinUtil.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 QueryJoinUtil.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) DiversifyingChildrenByteKnnVectorQuery(String field, byte[] query, Query childFilter, int k, BitSetProducer parentsFilter) Create a ToParentBlockJoinByteVectorQuery.DiversifyingChildrenFloatKnnVectorQuery(String field, float[] query, Query childFilter, int k, BitSetProducer parentsFilter) Create a ToParentBlockJoinFloatVectorQuery.(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 aParentChildrenBlockJoinQueryinstance(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) voidMatchHighlighter.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 QueryAnalyzingInfixSuggester.finishQuery(BooleanQuery.Builder in, boolean allTermsRequired) Subclass can override this to tweak the Query before searching.protected QueryAnalyzingInfixSuggester.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 TypeClassDescriptionclassAbstractQuerythat match documents containing terms with a specified prefix filtered byBitsProducer.classACompletionQuerythat matches documents specified by a wrappedCompletionQuerysupporting boosting and/or filtering by specified contexts.classACompletionQuerythat match documents containing terms within an edit distance of the specified prefix.classACompletionQuerywhich takes anAnalyzerto analyze the prefix of the query term.classACompletionQuerywhich 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 theWeightedSpanTermExtractoras called by thePhraseHelper.Methods in org.apache.lucene.search.uhighlight with parameters of type QueryModifier and TypeMethodDescriptionstatic booleanMultiTermHighlighting.canExtractAutomataFromLeafQuery(Query query) Indicates if the the leaf query (fromQueryVisitor.visitLeaf(Query)) is a type of query that we can extract automata from.voidMultiTermHighlighting.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 termsprotected LabelledCharArrayMatcher[]UnifiedHighlighter.getAutomata(String field, Query query, Set<UnifiedHighlighter.HighlightFlag> highlightFlags) protected FieldHighlighterUnifiedHighlighter.getFieldHighlighter(String field, Query query, Set<Term> allTerms, int maxPassages) protected UHComponentsUnifiedHighlighter.getHighlightComponents(String field, Query query, Set<Term> allTerms) protected PhraseHelperUnifiedHighlighter.getPhraseHelper(String field, Query query, Set<UnifiedHighlighter.HighlightFlag> highlightFlags) MultiTermHighlighting.AutomataCollector.getSubVisitor(BooleanClause.Occur occur, Query parent) protected booleanUnifiedHighlighter.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 theWeightedSpanTermExtractoras called by thePhraseHelper.private BytesRefOffsetsEnum.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) voidFieldQuery.QueryPhraseMap.add(Query query, IndexReader reader) protected voidFieldQuery.flatten(Query sourceQuery, IndexSearcher searcher, Collection<Query> flatQueries, float boost) FastVectorHighlighter.getFieldQuery(Query query) create aFieldQueryobject.FastVectorHighlighter.getFieldQuery(Query query, IndexReader reader) create aFieldQueryobject.private String(package private) FieldQuery.QueryPhraseMapFieldQuery.getRootMap(Query query) FieldQuery.getTermSet(Query query) Method parameters in org.apache.lucene.search.vectorhighlight with type arguments of type QueryModifier and TypeMethodDescriptionprivate voidFieldQuery.checkOverlap(Collection<Query> expandQueries, Term[] src, Term[] dest, int slop, float boost) private voidFieldQuery.checkOverlap(Collection<Query> expandQueries, PhraseQuery a, float aBoost, PhraseQuery b, float bBoost) (package private) Collection<Query> FieldQuery.expand(Collection<Query> flatQueries) protected voidFieldQuery.flatten(Query sourceQuery, IndexSearcher searcher, Collection<Query> flatQueries, float boost) (package private) voidFieldQuery.saveTerms(Collection<Query> flatQueries, IndexSearcher searcher) 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 classFinds all previously indexed points that fall within the specified polygon.Methods in org.apache.lucene.spatial3d that return QueryModifier and TypeMethodDescriptionstatic QueryGeo3DPoint.newBoxQuery(String field, PlanetModel planetModel, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude) Create a query for matching a box.static QueryGeo3DPoint.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 QueryGeo3DPoint.newLargePolygonQuery(String field, PlanetModel planetModel, Polygon... polygons) Create a query for matching a large polygon.static QueryGeo3DPoint.newPathQuery(String field, double[] pathLatitudes, double[] pathLongitudes, double pathWidthMeters, PlanetModel planetModel) Create a query for matching a path.static QueryGeo3DPoint.newPolygonQuery(String field, PlanetModel planetModel, Polygon... polygons) Create a query for matching a polygon.static QueryGeo3DPoint.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) QueryRamUsageEstimator.RamUsageQueryVisitor.rootMethods in org.apache.lucene.util that return QueryModifier and TypeMethodDescriptionprotected QueryQueryBuilder.analyzeBoolean(String field, TokenStream stream) Creates simple boolean query from the cached tokenstream contentsprotected QueryQueryBuilder.analyzeGraphBoolean(String field, TokenStream source, BooleanClause.Occur operator) Creates a boolean query from a graph token stream.protected QueryQueryBuilder.analyzeGraphPhrase(TokenStream source, String field, int phraseSlop) Creates graph phrase query from the tokenstream contentsprotected QueryQueryBuilder.analyzeMultiBoolean(String field, TokenStream stream, BooleanClause.Occur operator) Creates complex boolean query from the cached tokenstream contentsprotected QueryQueryBuilder.analyzeMultiPhrase(String field, TokenStream stream, int slop) Creates complex phrase query from the cached tokenstream contentsprotected QueryQueryBuilder.analyzePhrase(String field, TokenStream stream, int slop) Creates simple phrase query from the cached tokenstream contentsprotected QueryQueryBuilder.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 QueryQueryBuilder.createFieldQuery(Analyzer analyzer, BooleanClause.Occur operator, String field, String queryText, boolean quoted, int phraseSlop) Creates a query from the analysis chain.protected QueryQueryBuilder.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 QueryQueryBuilder.newGraphSynonymQuery(Iterator<Query> queries) Builds a new GraphQuery for multi-terms synonyms.protected QueryQueryBuilder.newSynonymQuery(String field, QueryBuilder.TermAndBoost[] terms) Builds a new SynonymQuery instance.protected QueryQueryBuilder.newTermQuery(Term term, float boost) Builds a new TermQuery instance.Methods in org.apache.lucene.util with parameters of type QueryModifier and TypeMethodDescriptionvoidRamUsageEstimator.RamUsageQueryVisitor.consumeTerms(Query query, Term... terms) RamUsageEstimator.RamUsageQueryVisitor.getSubVisitor(BooleanClause.Occur occur, Query parent) static longReturns the size in bytes of a Query object.static longReturns the size in bytes of a Query object.voidMethod parameters in org.apache.lucene.util with type arguments of type QueryModifier and TypeMethodDescriptionprotected QueryQueryBuilder.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 TypeMethodDescriptionvoidCompiledAutomaton.visit(QueryVisitor visitor, Query parent, String field) Report back to a QueryVisitor how this automaton matches terms
KeywordField.newSetQuery(String, Collection)instead.