Uses of Class
org.apache.lucene.search.Query
-
Packages that use Query Package Description org.apache.lucene.classification Uses already seen data (the indexed documents) to classify an input ( can be simple text or a structured document).org.apache.lucene.classification.document Uses already seen data (the indexed documents) to classify new documents.org.apache.lucene.classification.utils Utilities for evaluation, data preparation, etc.org.apache.lucene.document The logical representation of aDocument
for indexing and searching.org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.index.memory High-performance single-document main memory Apache Lucene fulltext search index.org.apache.lucene.monitor Monitoring frameworkorg.apache.lucene.payloads Experimental classes for interacting with payloadsorg.apache.lucene.queries Filters and Queries that add to core Lucene.org.apache.lucene.queries.function Queries that compute score based upon a function.org.apache.lucene.queries.function.valuesource A variety of functions to use with FunctionQuery.org.apache.lucene.queries.intervals Intervals queriesorg.apache.lucene.queries.mlt Document similarity query generators.org.apache.lucene.queries.payloads The payloads package provides Query mechanisms for finding and using payloads.org.apache.lucene.queryparser.classic A simple query parser implemented with JavaCC.org.apache.lucene.queryparser.complexPhrase QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"org.apache.lucene.queryparser.ext Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.org.apache.lucene.queryparser.flexible.standard Implementation of the Lucene classic query parser using the flexible query parser frameworksorg.apache.lucene.queryparser.flexible.standard.builders Standard Lucene Query Node Builders.org.apache.lucene.queryparser.simple A simple query parser for human-entered queries.org.apache.lucene.queryparser.surround.query This package contains SrndQuery and its subclasses.org.apache.lucene.queryparser.xml Parser that produces Lucene Query objects from XML streams.org.apache.lucene.queryparser.xml.builders XML Parser factories for different Lucene Query/Filters.org.apache.lucene.sandbox.queries Additional queries (some may have caveats or limitations)org.apache.lucene.search Code to search indices.org.apache.lucene.search.grouping Grouping.org.apache.lucene.search.highlight Highlighting search terms.org.apache.lucene.search.join Support for index-time and query-time joins.org.apache.lucene.search.spans The calculus of spans.org.apache.lucene.search.suggest.analyzing Analyzer based autosuggest.org.apache.lucene.search.suggest.document Support for document suggestionorg.apache.lucene.search.uhighlight The UnifiedHighlighter -- a flexible highlighter that can get offsets from postings, term vectors, or analysis.org.apache.lucene.search.vectorhighlight Another highlighter implementation based on term vectors.org.apache.lucene.util Some utility classes.org.apache.lucene.util.automaton Finite-state automaton for regular expressions. -
-
Uses of Query in org.apache.lucene.classification
Fields in org.apache.lucene.classification declared as Query Modifier and Type Field Description private Query
BM25NBClassifier. query
Query
used to eventually filter the document set to be used to classifyprivate Query
KNearestFuzzyClassifier. query
aQuery
used to filter the documents that should be used from this classifier's underlyingLeafReader
protected Query
KNearestNeighborClassifier. query
aQuery
used to filter the documents that should be used from this classifier's underlyingLeafReader
protected Query
SimpleNaiveBayesClassifier. query
Query
used to eventually filter the document set to be used to classifyConstructors in org.apache.lucene.classification with parameters of type Query Constructor Description BM25NBClassifier(IndexReader indexReader, Analyzer analyzer, Query query, java.lang.String classFieldName, java.lang.String... textFieldNames)
Creates a new NaiveBayes classifier.BooleanPerceptronClassifier(IndexReader indexReader, Analyzer analyzer, Query query, java.lang.Integer batchSize, java.lang.Double bias, java.lang.String classFieldName, java.lang.String textFieldName)
Creates aBooleanPerceptronClassifier
CachingNaiveBayesClassifier(IndexReader indexReader, Analyzer analyzer, Query query, java.lang.String classFieldName, java.lang.String... textFieldNames)
Creates a new NaiveBayes classifier with inside caching.KNearestFuzzyClassifier(IndexReader indexReader, Similarity similarity, Analyzer analyzer, Query query, int k, java.lang.String classFieldName, java.lang.String... textFieldNames)
Creates aKNearestFuzzyClassifier
.KNearestNeighborClassifier(IndexReader indexReader, Similarity similarity, Analyzer analyzer, Query query, int k, int minDocsFreq, int minTermFreq, java.lang.String classFieldName, java.lang.String... textFieldNames)
Creates aKNearestNeighborClassifier
.SimpleNaiveBayesClassifier(IndexReader indexReader, Analyzer analyzer, Query query, java.lang.String classFieldName, java.lang.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 Query Constructor Description KNearestNeighborDocumentClassifier(IndexReader indexReader, Similarity similarity, Query query, int k, int minDocsFreq, int minTermFreq, java.lang.String classFieldName, java.util.Map<java.lang.String,Analyzer> field2analyzer, java.lang.String... textFieldNames)
Creates aKNearestNeighborClassifier
.SimpleNaiveBayesDocumentClassifier(IndexReader indexReader, Query query, java.lang.String classFieldName, java.util.Map<java.lang.String,Analyzer> field2analyzer, java.lang.String... textFieldNames)
Creates a new NaiveBayes classifier. -
Uses of Query in org.apache.lucene.classification.utils
Subclasses of Query in org.apache.lucene.classification.utils Modifier and Type Class Description class
NearestFuzzyQuery
Simplification of FuzzyLikeThisQuery, to be used in the context of KNN classification.Methods in org.apache.lucene.classification.utils that return Query Modifier and Type Method Description private Query
NearestFuzzyQuery. newTermQuery(IndexReader reader, Term term)
Query
NearestFuzzyQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.document
Subclasses of Query in org.apache.lucene.document Modifier and Type Class Description (package private) class
BinaryRangeFieldRangeQuery
(package private) class
DoubleRangeSlowRangeQuery
(package private) class
FeatureQuery
(package private) class
FloatRangeSlowRangeQuery
(package private) class
IntRangeSlowRangeQuery
(package private) class
LatLonDocValuesBoxQuery
Distance query forLatLonDocValuesField
.(package private) class
LatLonDocValuesQuery
Finds all previously indexed geo points that comply the givenShapeField.QueryRelation
with the specified array ofLatLonGeometry
.(package private) class
LatLonPointDistanceFeatureQuery
(package private) class
LatLonPointDistanceQuery
Distance query forLatLonPoint
.(package private) class
LatLonPointQuery
Finds all previously indexed geo points that comply the givenShapeField.QueryRelation
with the specified array ofLatLonGeometry
.(package private) class
LatLonShapeBoundingBoxQuery
Finds all previously indexed geo shapes that intersect the specified bounding box.(package private) class
LatLonShapeQuery
Finds all previously indexed geo shapes that comply the givenShapeField.QueryRelation
with the specified array ofLatLonGeometry
.(package private) class
LongDistanceFeatureQuery
(package private) class
LongRangeSlowRangeQuery
(package private) class
RangeFieldQuery
Query class for searchingRangeField
types by a definedPointValues.Relation
.(package private) class
SortedNumericDocValuesRangeQuery
(package private) class
SortedSetDocValuesRangeQuery
(package private) class
SpatialQuery
class
XYDocValuesPointInGeometryQuery
XYGeometry query forXYDocValuesField
.(package private) class
XYPointInGeometryQuery
Finds all previously indexed points that fall within the specified XY geometries.(package private) class
XYShapeQuery
Finds all previously indexed cartesian shapes that comply the givenShapeField.QueryRelation
with the specified array ofXYGeometry
.Methods in org.apache.lucene.document that return Query Modifier and Type Method Description private static Query
LatLonPoint. makeContainsGeometryQuery(java.lang.String field, LatLonGeometry... latLonGeometries)
private static Query
LatLonShape. makeContainsGeometryQuery(java.lang.String field, LatLonGeometry... latLonGeometries)
private static Query
LatLonPoint. newBoxInternal(java.lang.String field, byte[] min, byte[] max)
static Query
LatLonPoint. newBoxQuery(java.lang.String field, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude)
Create a query for matching a bounding box.static Query
LatLonShape. newBoxQuery(java.lang.String field, 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 boxstatic Query
XYPointField. newBoxQuery(java.lang.String field, float minX, float maxX, float minY, float maxY)
Create a query for matching a bounding box.static Query
XYShape. newBoxQuery(java.lang.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 boxstatic Query
DoubleRange. newContainsQuery(java.lang.String field, double[] min, double[] max)
Create a query for matching indexed ranges that contain the defined range.static Query
FloatRange. newContainsQuery(java.lang.String field, float[] min, float[] max)
Create a query for matching indexed float ranges that contain the defined range.static Query
InetAddressRange. newContainsQuery(java.lang.String field, java.net.InetAddress min, java.net.InetAddress max)
Create a query for matching indexed ip ranges thatCONTAINS
the defined range.static Query
IntRange. newContainsQuery(java.lang.String field, int[] min, int[] max)
Create a query for matching indexed ranges that contain the defined range.static Query
LatLonBoundingBox. newContainsQuery(java.lang.String field, double minLat, double minLon, double maxLat, double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that contain the defined 2d bounding boxstatic Query
LongRange. newContainsQuery(java.lang.String field, long[] min, long[] max)
Create a query for matching indexed ranges that contain the defined range.static Query
DoubleRange. newCrossesQuery(java.lang.String field, double[] min, double[] max)
Create a query for matching indexed ranges that cross the defined range.static Query
FloatRange. newCrossesQuery(java.lang.String field, float[] min, float[] max)
Create a query for matching indexed ranges that cross the defined range.static Query
InetAddressRange. newCrossesQuery(java.lang.String field, java.net.InetAddress min, java.net.InetAddress max)
Create a query for matching indexed ip ranges thatCROSS
the defined range.static Query
IntRange. newCrossesQuery(java.lang.String field, int[] min, int[] max)
Create a query for matching indexed ranges that cross the defined range.static Query
LatLonBoundingBox. newCrossesQuery(java.lang.String field, double minLat, double minLon, double maxLat, double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that cross the defined 3d bounding boxstatic Query
LongRange. newCrossesQuery(java.lang.String field, long[] min, long[] max)
Create a query for matching indexed ranges that cross the defined range.static Query
LatLonPoint. newDistanceFeatureQuery(java.lang.String field, float weight, double originLat, double originLon, double pivotDistanceMeters)
Given a field that indexes point values into aLatLonPoint
and doc values intoLatLonDocValuesField
, this returns a query that scores documents based on their haversine distance in meters to(originLat, originLon)
:score = weight * pivotDistanceMeters / (pivotDistanceMeters + distance)
, ie.static Query
LongPoint. newDistanceFeatureQuery(java.lang.String field, float weight, long origin, long pivotDistance)
Given a field that indexes the same long values into aLongPoint
and doc values (eitherNumericDocValuesField
orSortedNumericDocValuesField
), this returns a query that scores documents based on their distance toorigin
:score = weight * pivotDistance / (pivotDistance + distance)
, ie.static Query
LatLonPoint. newDistanceQuery(java.lang.String field, double latitude, double longitude, double radiusMeters)
Create a query for matching points within the specified distance of the supplied location.static Query
LatLonShape. newDistanceQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, Circle... circle)
create a query to find all polygons that intersect a provided circle.static Query
XYPointField. newDistanceQuery(java.lang.String field, float x, float y, float radius)
Create a query for matching points within the specified distance of the supplied location.static Query
XYShape. newDistanceQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, XYCircle... circle)
create a query to find all cartesian shapes that intersect a provided circle (or arrays of circles)static Query
BigIntegerPoint. newExactQuery(java.lang.String field, java.math.BigInteger value)
Create a query for matching an exact big integer value.static Query
BinaryPoint. newExactQuery(java.lang.String field, byte[] value)
Create a query for matching an exact binary value.static Query
DoublePoint. newExactQuery(java.lang.String field, double value)
Create a query for matching an exact double value.static Query
FloatPoint. newExactQuery(java.lang.String field, float value)
Create a query for matching an exact float value.static Query
HalfFloatPoint. newExactQuery(java.lang.String field, float value)
Create a query for matching an exact half-float value.static Query
InetAddressPoint. newExactQuery(java.lang.String field, java.net.InetAddress value)
Create a query for matching a network address.static Query
IntPoint. newExactQuery(java.lang.String field, int value)
Create a query for matching an exact integer value.static Query
LongPoint. newExactQuery(java.lang.String field, long value)
Create a query for matching an exact long value.static Query
LatLonPoint. newGeometryQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries)
Create a query for matching one or more geometries against the providedShapeField.QueryRelation
.static Query
LatLonShape. newGeometryQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries)
create a query to find all indexed geo shapes that intersect a provided geometry (or array of geometries).static Query
XYPointField. newGeometryQuery(java.lang.String field, XYGeometry... xyGeometries)
create a query to find all indexed shapes that intersect a provided geometry collection.static Query
XYShape. newGeometryQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, XYGeometry... xyGeometries)
create a query to find all indexed geo shapes that intersect a provided geometry collection note: Components do not support dateline crossingstatic Query
DoubleRange. newIntersectsQuery(java.lang.String field, double[] min, double[] max)
Create a query for matching indexed ranges that intersect the defined range.static Query
FloatRange. newIntersectsQuery(java.lang.String field, float[] min, float[] max)
Create a query for matching indexed ranges that intersect the defined range.static Query
InetAddressRange. newIntersectsQuery(java.lang.String field, java.net.InetAddress min, java.net.InetAddress max)
Create a query for matching indexed ip ranges thatINTERSECT
the defined range.static Query
IntRange. newIntersectsQuery(java.lang.String field, int[] min, int[] max)
Create a query for matching indexed ranges that intersect the defined range.static Query
LatLonBoundingBox. newIntersectsQuery(java.lang.String field, double minLat, double minLon, double maxLat, double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that intersect the defined 3d bounding rangesstatic Query
LongRange. newIntersectsQuery(java.lang.String field, long[] min, long[] max)
Create a query for matching indexed ranges that intersect the defined range.static Query
FeatureField. newLinearQuery(java.lang.String fieldName, java.lang.String featureName, float weight)
Return a newQuery
that will score documents asweight * S
where S is the value of the static feature.static Query
LatLonShape. newLineQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, Line... lines)
create a query to find all indexed geo shapes that intersect a provided linestring (or array of linestrings) note: does not support dateline crossingstatic Query
XYShape. newLineQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, XYLine... lines)
create a query to find all cartesian shapes that intersect a provided linestring (or array of linestrings)static Query
FeatureField. newLogQuery(java.lang.String fieldName, java.lang.String featureName, float weight, float scalingFactor)
Return a newQuery
that will score documents asweight * Math.log(scalingFactor + S)
where S is the value of the static feature.static Query
LatLonShape. newPointQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, double[]... points)
create a query to find all indexed shapes that comply theShapeField.QueryRelation
with the provided pointsstatic Query
XYShape. newPointQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, float[]... points)
create a query to find all indexed shapes that comply theShapeField.QueryRelation
with the provided pointstatic Query
LatLonPoint. newPolygonQuery(java.lang.String field, Polygon... polygons)
Create a query for matching one or more polygons.static Query
LatLonShape. newPolygonQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, Polygon... polygons)
create a query to find all indexed geo shapes that intersect a provided polygon (or array of polygons) note: does not support dateline crossingstatic Query
XYPointField. newPolygonQuery(java.lang.String field, XYPolygon... polygons)
Create a query for matching one or more polygons.static Query
XYShape. newPolygonQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, XYPolygon... polygons)
create a query to find all cartesian shapes that intersect a provided polygon (or array of polygons)static Query
InetAddressPoint. newPrefixQuery(java.lang.String field, java.net.InetAddress value, int prefixLength)
Create a prefix query for matching a CIDR network range.static Query
BigIntegerPoint. newRangeQuery(java.lang.String field, java.math.BigInteger[] lowerValue, java.math.BigInteger[] upperValue)
Create a range query for n-dimensional big integer values.static Query
BigIntegerPoint. newRangeQuery(java.lang.String field, java.math.BigInteger lowerValue, java.math.BigInteger upperValue)
Create a range query for big integer values.static Query
BinaryPoint. newRangeQuery(java.lang.String field, byte[][] lowerValue, byte[][] upperValue)
Create a range query for n-dimensional binary values.static Query
BinaryPoint. newRangeQuery(java.lang.String field, byte[] lowerValue, byte[] upperValue)
Create a range query for binary values.static Query
DoublePoint. newRangeQuery(java.lang.String field, double[] lowerValue, double[] upperValue)
Create a range query for n-dimensional double values.static Query
DoublePoint. newRangeQuery(java.lang.String field, double lowerValue, double upperValue)
Create a range query for double values.static Query
FloatPoint. newRangeQuery(java.lang.String field, float[] lowerValue, float[] upperValue)
Create a range query for n-dimensional float values.static Query
FloatPoint. newRangeQuery(java.lang.String field, float lowerValue, float upperValue)
Create a range query for float values.static Query
HalfFloatPoint. newRangeQuery(java.lang.String field, float[] lowerValue, float[] upperValue)
Create a range query for n-dimensional half-float values.static Query
HalfFloatPoint. newRangeQuery(java.lang.String field, float lowerValue, float upperValue)
Create a range query for half-float values.static Query
InetAddressPoint. newRangeQuery(java.lang.String field, java.net.InetAddress lowerValue, java.net.InetAddress upperValue)
Create a range query for network addresses.static Query
IntPoint. newRangeQuery(java.lang.String field, int[] lowerValue, int[] upperValue)
Create a range query for n-dimensional integer values.static Query
IntPoint. newRangeQuery(java.lang.String field, int lowerValue, int upperValue)
Create a range query for integer values.private static Query
LatLonBoundingBox. newRangeQuery(java.lang.String field, double minLat, double minLon, double maxLat, double maxLon, RangeFieldQuery.QueryType queryType)
helper method to create a two-dimensional geospatial bounding box querystatic Query
LongPoint. newRangeQuery(java.lang.String field, long[] lowerValue, long[] upperValue)
Create a range query for n-dimensional long values.static Query
LongPoint. newRangeQuery(java.lang.String field, long lowerValue, long upperValue)
Create a range query for long values.private static Query
DoubleRange. newRelationQuery(java.lang.String field, double[] min, double[] max, RangeFieldQuery.QueryType relation)
helper method for creating the desired relational queryprivate static Query
FloatRange. newRelationQuery(java.lang.String field, float[] min, float[] max, RangeFieldQuery.QueryType relation)
helper method for creating the desired relational queryprivate static Query
InetAddressRange. newRelationQuery(java.lang.String field, java.net.InetAddress min, java.net.InetAddress max, RangeFieldQuery.QueryType relation)
helper method for creating the desired relational queryprivate static Query
IntRange. newRelationQuery(java.lang.String field, int[] min, int[] max, RangeFieldQuery.QueryType relation)
helper method for creating the desired relational queryprivate static Query
LongRange. newRelationQuery(java.lang.String field, long[] min, long[] max, RangeFieldQuery.QueryType relation)
helper method for creating the desired relational querystatic Query
FeatureField. newSaturationQuery(java.lang.String fieldName, java.lang.String featureName)
Same asFeatureField.newSaturationQuery(String, String, float, float)
but1f
is used as a weight and a reasonably good default pivot value is computed based on index statistics and is approximately equal to the geometric mean of all values that exist in the index.static Query
FeatureField. newSaturationQuery(java.lang.String fieldName, java.lang.String featureName, float weight, float pivot)
Return a newQuery
that will score documents asweight * S / (S + pivot)
where S is the value of the static feature.private static Query
FeatureField. newSaturationQuery(java.lang.String fieldName, java.lang.String featureName, float weight, java.lang.Float pivot)
static Query
BigIntegerPoint. newSetQuery(java.lang.String field, java.math.BigInteger... values)
Create a query matching any of the specified 1D values.static Query
BinaryPoint. newSetQuery(java.lang.String field, byte[]... values)
Create a query matching any of the specified 1D values.static Query
DoublePoint. newSetQuery(java.lang.String field, double... values)
Create a query matching any of the specified 1D values.static Query
DoublePoint. newSetQuery(java.lang.String field, java.util.Collection<java.lang.Double> values)
Create a query matching any of the specified 1D values.static Query
FloatPoint. newSetQuery(java.lang.String field, float... values)
Create a query matching any of the specified 1D values.static Query
FloatPoint. newSetQuery(java.lang.String field, java.util.Collection<java.lang.Float> values)
Create a query matching any of the specified 1D values.static Query
HalfFloatPoint. newSetQuery(java.lang.String field, float... values)
Create a query matching any of the specified 1D values.static Query
HalfFloatPoint. newSetQuery(java.lang.String field, java.util.Collection<java.lang.Float> values)
Create a query matching any of the specified 1D values.static Query
InetAddressPoint. newSetQuery(java.lang.String field, java.net.InetAddress... values)
Create a query matching any of the specified 1D values.static Query
IntPoint. newSetQuery(java.lang.String field, int... values)
Create a query matching any of the specified 1D values.static Query
IntPoint. newSetQuery(java.lang.String field, java.util.Collection<java.lang.Integer> values)
Create a query matching any of the specified 1D values.static Query
LongPoint. newSetQuery(java.lang.String field, long... values)
Create a query matching any of the specified 1D values.static Query
LongPoint. newSetQuery(java.lang.String field, java.util.Collection<java.lang.Long> values)
Create a query matching any of the specified 1D values.static Query
FeatureField. newSigmoidQuery(java.lang.String fieldName, java.lang.String featureName, float weight, float pivot, float exp)
Return a newQuery
that will score documents asweight * S^a / (S^a + pivot^a)
where S is the value of the static feature.static Query
LatLonDocValuesField. newSlowBoxQuery(java.lang.String field, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude)
Create a query for matching a bounding box using doc values.static Query
XYDocValuesField. newSlowBoxQuery(java.lang.String field, float minX, float maxX, float minY, float maxY)
Create a query for matching a bounding box using doc values.static Query
LatLonDocValuesField. newSlowDistanceQuery(java.lang.String field, double latitude, double longitude, double radiusMeters)
Create a query for matching points within the specified distance of the supplied location.static Query
XYDocValuesField. newSlowDistanceQuery(java.lang.String field, float x, float y, float radius)
Create a query for matching points within the specified distance of the supplied location.static Query
NumericDocValuesField. newSlowExactQuery(java.lang.String field, long value)
Create a query for matching an exact long value.static Query
SortedDocValuesField. newSlowExactQuery(java.lang.String field, BytesRef value)
Create a query for matching an exactBytesRef
value.static Query
SortedNumericDocValuesField. newSlowExactQuery(java.lang.String field, long value)
Create a query for matching an exact long value.static Query
SortedSetDocValuesField. newSlowExactQuery(java.lang.String field, BytesRef value)
Create a query for matching an exactBytesRef
value.static Query
LatLonDocValuesField. newSlowGeometryQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... latLonGeometries)
Create a query for matching one or more geometries against the providedShapeField.QueryRelation
.static Query
XYDocValuesField. newSlowGeometryQuery(java.lang.String field, XYGeometry... geometries)
Create a query for matching points within the supplied geometries.static Query
DoubleRangeDocValuesField. newSlowIntersectsQuery(java.lang.String field, double[] min, double[] max)
Create a new range query that finds all ranges that intersect using doc values.static Query
FloatRangeDocValuesField. newSlowIntersectsQuery(java.lang.String field, float[] min, float[] max)
Create a new range query that finds all ranges that intersect using doc values.static Query
IntRangeDocValuesField. newSlowIntersectsQuery(java.lang.String field, int[] min, int[] max)
Create a new range query that finds all ranges that intersect using doc values.static Query
LongRangeDocValuesField. newSlowIntersectsQuery(java.lang.String field, long[] min, long[] max)
Create a new range query that finds all ranges that intersect using doc values.static Query
LatLonDocValuesField. newSlowPolygonQuery(java.lang.String field, Polygon... polygons)
Create a query for matching points within the supplied polygons.static Query
XYDocValuesField. newSlowPolygonQuery(java.lang.String field, XYPolygon... polygons)
Create a query for matching points within the supplied polygons.private static Query
DoubleRangeDocValuesField. newSlowRangeQuery(java.lang.String field, double[] min, double[] max, RangeFieldQuery.QueryType queryType)
private static Query
FloatRangeDocValuesField. newSlowRangeQuery(java.lang.String field, float[] min, float[] max, RangeFieldQuery.QueryType queryType)
private static Query
IntRangeDocValuesField. newSlowRangeQuery(java.lang.String field, int[] min, int[] max, RangeFieldQuery.QueryType queryType)
private static Query
LongRangeDocValuesField. newSlowRangeQuery(java.lang.String field, long[] min, long[] max, RangeFieldQuery.QueryType queryType)
static Query
NumericDocValuesField. newSlowRangeQuery(java.lang.String field, long lowerValue, long upperValue)
Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
included.static Query
SortedDocValuesField. newSlowRangeQuery(java.lang.String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive)
Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
included.static Query
SortedNumericDocValuesField. newSlowRangeQuery(java.lang.String field, long lowerValue, long upperValue)
Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
included.static Query
SortedSetDocValuesField. newSlowRangeQuery(java.lang.String field, BytesRef lowerValue, BytesRef upperValue, boolean lowerInclusive, boolean upperInclusive)
Create a range query that matches all documents whose value is betweenlowerValue
andupperValue
.static Query
DoubleRange. newWithinQuery(java.lang.String field, double[] min, double[] max)
Create a query for matching indexed ranges that are within the defined range.static Query
FloatRange. newWithinQuery(java.lang.String field, float[] min, float[] max)
Create a query for matching indexed ranges that are within the defined range.static Query
InetAddressRange. newWithinQuery(java.lang.String field, java.net.InetAddress min, java.net.InetAddress max)
Create a query for matching indexed ip ranges that areWITHIN
the defined range.static Query
IntRange. newWithinQuery(java.lang.String field, int[] min, int[] max)
Create a query for matching indexed ranges that are within the defined range.static Query
LatLonBoundingBox. newWithinQuery(java.lang.String field, double minLat, double minLon, double maxLat, double maxLon)
Create a new 2d query that finds all indexed 2d GeoBoundingBoxField values that are within the defined 2d bounding boxstatic Query
LongRange. newWithinQuery(java.lang.String field, long[] min, long[] max)
Create a query for matching indexed ranges that are within the defined range.Query
BinaryRangeFieldRangeQuery. rewrite(IndexReader reader)
Query
DoubleRangeSlowRangeQuery. rewrite(IndexReader reader)
Query
FeatureQuery. rewrite(IndexReader reader)
Query
FloatRangeSlowRangeQuery. rewrite(IndexReader reader)
Query
IntRangeSlowRangeQuery. rewrite(IndexReader reader)
Query
LongRangeSlowRangeQuery. rewrite(IndexReader reader)
Query
SortedNumericDocValuesRangeQuery. rewrite(IndexReader reader)
Query
SortedSetDocValuesRangeQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.index
Fields in org.apache.lucene.index declared as Query Modifier and Type Field Description (package private) Query[]
FrozenBufferedUpdates. deleteQueries
private Query
PKIndexSplitter. docsInFirstIndex
Fields in org.apache.lucene.index with type parameters of type Query Modifier and Type Field Description (package private) java.util.Map<Query,java.lang.Integer>
BufferedUpdates. deleteQueries
private java.util.function.Supplier<Query>
SoftDeletesRetentionMergePolicy. retentionQuerySupplier
Methods in org.apache.lucene.index with parameters of type Query Modifier and Type Method Description (package private) long
DocumentsWriterDeleteQueue. addDelete(Query... queries)
void
BufferedUpdates. addQuery(Query query, int docIDUpto)
(package private) static CodecReader
SoftDeletesRetentionMergePolicy. applyRetentionQuery(java.lang.String softDeleteField, Query retentionQuery, CodecReader reader)
private void
PKIndexSplitter. createIndex(IndexWriterConfig config, Directory target, DirectoryReader reader, Query preserveFilter, boolean negateFilter)
long
IndexWriter. deleteDocuments(Query... queries)
Deletes the document(s) matching any of the provided queries.(package private) long
DocumentsWriter. deleteQueries(Query... queries)
private static Scorer
SoftDeletesRetentionMergePolicy. getScorer(Query query, CodecReader reader)
Constructors in org.apache.lucene.index with parameters of type Query Constructor Description PKIndexSplitter(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)
QueryArrayNode(Query[] query)
Constructor parameters in org.apache.lucene.index with type arguments of type Query Constructor Description SoftDeletesRetentionMergePolicy(java.lang.String field, java.util.function.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 Modifier and Type Method Description float
MemoryIndex. search(Query query)
Convenience method that efficiently returns the relevance score by matching this index against the given Lucene query expression. -
Uses of Query in org.apache.lucene.monitor
Subclasses of Query in org.apache.lucene.monitor Modifier and Type Class Description (package private) class
ForceNoBulkScoringQuery
Query wrapper that forces its wrapped Query to use the default doc-by-doc BulkScorer.Fields in org.apache.lucene.monitor declared as Query Modifier and Type Field Description private Query
ForceNoBulkScoringQuery. inner
(package private) Query
ParallelMatcher.MatcherTask. matchQuery
(package private) Query
PartitionMatcher.MatchTask. matchQuery
(package private) Query
QueryCacheEntry. matchQuery
The (possibly partial due to decomposition) queryprivate Query
MonitorQuery. query
Fields in org.apache.lucene.monitor with type parameters of type Query Modifier and Type Field Description private java.util.function.BiFunction<Query,TermWeightor,QueryTree>
QueryAnalyzer. unknownQueryMapper
Methods in org.apache.lucene.monitor that return Query Modifier and Type Method Description Query
MultipassTermFilteredPresearcher.MultipassDocumentQueryBuilder. build()
Query
TermFilteredPresearcher.DocumentQueryBuilder. build()
private Query
TermFilteredPresearcher. buildFilterClause(LeafReader reader, java.lang.String field)
private Query
TermFilteredPresearcher. buildFilterFields(LeafReader reader)
abstract Query
Presearcher. buildQuery(LeafReader reader, java.util.function.BiPredicate<java.lang.String,BytesRef> termAcceptor)
Build a query for a Monitor's queryindex from a LeafReader over a set of documents to monitor.Query
QueryIndex.QueryBuilder. buildQuery(java.util.function.BiPredicate<java.lang.String,BytesRef> termAcceptor)
Query
TermFilteredPresearcher. buildQuery(LeafReader reader, java.util.function.BiPredicate<java.lang.String,BytesRef> termAcceptor)
Query
MonitorQuery. getQuery()
Query
ForceNoBulkScoringQuery. getWrappedQuery()
Query
ForceNoBulkScoringQuery. rewrite(IndexReader reader)
Methods in org.apache.lucene.monitor that return types with arguments of type Query Modifier and Type Method Description private static java.util.function.BiFunction<Query,TermWeightor,QueryTree>
QueryAnalyzer. buildMapper(java.util.List<CustomQueryHandler> mappers)
java.util.Set<Query>
QueryDecomposer. decompose(Query q)
Split a query up into individual parts that can be indexed and run separatelyjava.util.Set<Query>
QueryDecomposer. decomposeBoolean(BooleanQuery q)
Decompose aBooleanQuery
java.util.Set<Query>
QueryDecomposer. decomposeBoostQuery(BoostQuery q)
Methods in org.apache.lucene.monitor with parameters of type Query Modifier and Type Method Description (package private) QueryTree
QueryAnalyzer. buildTree(Query luceneQuery, TermWeightor weightor)
Create aQueryTree
from a passed in Query or Filtervoid
QueryAnalyzer.QueryBuilder. consumeTerms(Query query, Term... terms)
java.util.Set<Query>
QueryDecomposer. decompose(Query q)
Split a query up into individual parts that can be indexed and run separatelyQueryVisitor
QueryAnalyzer.QueryBuilder. getSubVisitor(BooleanClause.Occur occur, Query parent)
QueryTree
CustomQueryHandler. handleQuery(Query query, TermWeightor termWeightor)
Builds aQueryTree
node from a queryQueryTree
RegexpQueryHandler. handleQuery(Query q, TermWeightor termWeightor)
abstract Document
Presearcher. indexQuery(Query query, java.util.Map<java.lang.String,java.lang.String> metadata)
Build a lucene Document to index the query in a Monitor's queryindexDocument
TermFilteredPresearcher. indexQuery(Query query, java.util.Map<java.lang.String,java.lang.String> metadata)
protected abstract void
CandidateMatcher. matchQuery(java.lang.String queryId, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata)
Runs the supplied query against this CandidateMatcher's set of documents, storing any resulting match, and recording the query in the presearcher hitsprotected void
CollectingMatcher. matchQuery(java.lang.String queryId, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata)
protected void
ParallelMatcher. matchQuery(java.lang.String queryId, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata)
protected void
PartitionMatcher. matchQuery(java.lang.String queryId, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata)
(package private) long
QueryIndex. search(Query query, QueryIndex.QueryCollector matcher)
void
QueryAnalyzer.QueryBuilder. visitLeaf(Query query)
Method parameters in org.apache.lucene.monitor with type arguments of type Query Modifier and Type Method Description static MonitorQuerySerializer
MonitorQuerySerializer. fromParser(java.util.function.Function<java.lang.String,Query> parser)
Build a serializer from a query parserConstructors in org.apache.lucene.monitor with parameters of type Query Constructor Description ForceNoBulkScoringQuery(Query inner)
MatcherTask(java.lang.String id, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata)
MatchTask(java.lang.String queryId, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata)
MonitorQuery(java.lang.String id, Query query)
Creates a new MonitorQuery with empty metadata and no string representationMonitorQuery(java.lang.String id, Query query, java.lang.String queryString, java.util.Map<java.lang.String,java.lang.String> metadata)
Creates a new MonitorQueryQueryCacheEntry(java.lang.String cacheId, java.lang.String queryId, Query matchQuery, java.util.Map<java.lang.String,java.lang.String> metadata)
-
Uses of Query in org.apache.lucene.payloads
Methods in org.apache.lucene.payloads with parameters of type Query Modifier and Type Method Description java.util.Collection<byte[]>
PayloadSpanUtil. getPayloadsForQuery(Query query)
Query should be rewritten for wild/fuzzy support.private void
PayloadSpanUtil. queryToSpanQuery(Query query, java.util.Collection<byte[]> payloads)
-
Uses of Query in org.apache.lucene.queries
Subclasses of Query in org.apache.lucene.queries Modifier and Type Class Description class
CommonTermsQuery
A query that executes high-frequency terms in a optional sub-query to prevent slow queries due to "common" terms like stopwords.Methods in org.apache.lucene.queries that return Query Modifier and Type Method Description protected Query
CommonTermsQuery. buildQuery(int maxDoc, TermStates[] contextArray, Term[] queryTerms)
protected Query
CommonTermsQuery. newTermQuery(Term term, TermStates termStates)
Builds a new TermQuery instance.Query
CommonTermsQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.queries.function
Subclasses of Query in org.apache.lucene.queries.function Modifier and Type Class Description class
FunctionMatchQuery
A query that retrieves all documents with aDoubleValues
value matching a predicate This query works by a linear scan of the index, and is best used in conjunction with other queries that can restrict the number of documents visitedclass
FunctionQuery
Returns a score for each document based on a ValueSource, often some function of the value of a field.class
FunctionRangeQuery
A Query wrapping aValueSource
that matches docs in which the values in the value source match a configured range.class
FunctionScoreQuery
A query that wraps another query, and uses a DoubleValuesSource to replace or modify the wrapped query's score If the DoubleValuesSource doesn't return a value for a particular document, then that document will be given a score of 0.Fields in org.apache.lucene.queries.function declared as Query Modifier and Type Field Description private Query
FunctionScoreQuery. in
Methods in org.apache.lucene.queries.function that return Query Modifier and Type Method Description Query
FunctionScoreQuery. getWrappedQuery()
Query
FunctionScoreQuery. rewrite(IndexReader reader)
Methods in org.apache.lucene.queries.function with parameters of type Query Modifier and Type Method Description static FunctionScoreQuery
FunctionScoreQuery. boostByQuery(Query in, Query boostMatch, float boostValue)
Returns a FunctionScoreQuery where the scores of a wrapped query are multiplied by a boost factor if the document being scored also matches a separate boosting query.static FunctionScoreQuery
FunctionScoreQuery. boostByValue(Query in, DoubleValuesSource boost)
Returns a FunctionScoreQuery where the scores of a wrapped query are multiplied by the value of a DoubleValuesSource.Constructors in org.apache.lucene.queries.function with parameters of type Query Constructor Description FunctionScoreQuery(Query in, DoubleValuesSource source)
Create a new FunctionScoreQueryFunctionScoreWeight(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 Query Modifier and Type Field Description (package private) Query
QueryDocValues. q
(package private) Query
QueryValueSource. q
Methods in org.apache.lucene.queries.function.valuesource that return Query Modifier and Type Method Description Query
QueryValueSource. getQuery()
Constructors in org.apache.lucene.queries.function.valuesource with parameters of type Query Constructor Description QueryValueSource(Query q, float defVal)
-
Uses of Query in org.apache.lucene.queries.intervals
Subclasses of Query in org.apache.lucene.queries.intervals Modifier and Type Class Description class
IntervalQuery
A query that retrieves documents containing intervals returned from anIntervalsSource
Static constructor functions for various different sources can be found in theIntervals
class Scores for this query are computed as a function of the sloppy frequency of intervals appearing in a particular document.Fields in org.apache.lucene.queries.intervals declared as Query Modifier and Type Field Description private Query[]
CachingMatchesIterator. matchingQueries
Methods in org.apache.lucene.queries.intervals that return Query Modifier and Type Method Description Query
ConjunctionIntervalsSource.ConjunctionMatchesIterator. getQuery()
Query
DisjunctionIntervalsSource.DisjunctionMatchesIterator. getQuery()
Query
MinimizingConjunctionMatchesIterator. getQuery()
Query
MinimumShouldMatchIntervalsSource.MinimumMatchesIterator. getQuery()
Query
RepeatingIntervalsSource.DuplicateMatchesIterator. getQuery()
Constructors in org.apache.lucene.queries.intervals with parameters of type Query Constructor Description IntervalWeight(Query query, float boost, ScoreMode scoreMode)
-
Uses of Query in org.apache.lucene.queries.mlt
Subclasses of Query in org.apache.lucene.queries.mlt Modifier and Type Class Description class
MoreLikeThisQuery
A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg in custom QueryParser extensions.Methods in org.apache.lucene.queries.mlt that return Query Modifier and Type Method Description private Query
MoreLikeThis. createQuery(PriorityQueue<MoreLikeThis.ScoreTerm> q)
Create the More like query from a PriorityQueueQuery
MoreLikeThis. like(int docNum)
Return a query that will return docs like the passed lucene document ID.Query
MoreLikeThis. like(java.lang.String fieldName, java.io.Reader... readers)
Return a query that will return docs like the passed Readers.Query
MoreLikeThis. like(java.util.Map<java.lang.String,java.util.Collection<java.lang.Object>> filteredDocument)
Query
MoreLikeThisQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.queries.payloads
Subclasses of Query in org.apache.lucene.queries.payloads Modifier and Type Class Description class
PayloadScoreQuery
A Query class that uses aPayloadFunction
to modify the score of a wrapped SpanQueryclass
SpanPayloadCheckQuery
Only return those matches that have a specific payload at the given position.Methods in org.apache.lucene.queries.payloads that return Query Modifier and Type Method Description Query
PayloadScoreQuery. rewrite(IndexReader reader)
Query
SpanPayloadCheckQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.queryparser.classic
Methods in org.apache.lucene.queryparser.classic that return Query Modifier and Type Method Description private Query
MultiFieldQueryParser. applySlop(Query q, int slop)
Query
QueryParser. Clause(java.lang.String field)
protected Query
QueryParserBase. getBooleanQuery(java.util.List<BooleanClause> clauses)
Factory method for generating query, given a set of clauses.protected Query
MultiFieldQueryParser. getFieldQuery(java.lang.String field, java.lang.String queryText, boolean quoted)
protected Query
MultiFieldQueryParser. getFieldQuery(java.lang.String field, java.lang.String queryText, int slop)
protected Query
QueryParserBase. getFieldQuery(java.lang.String field, java.lang.String queryText, boolean quoted)
protected Query
QueryParserBase. getFieldQuery(java.lang.String field, java.lang.String queryText, int slop)
Base implementation delegates toQueryParserBase.getFieldQuery(String,String,boolean)
.protected Query
MultiFieldQueryParser. getFuzzyQuery(java.lang.String field, java.lang.String termStr, float minSimilarity)
protected Query
QueryParserBase. getFuzzyQuery(java.lang.String field, java.lang.String termStr, float minSimilarity)
Factory method for generating a query (similar toQueryParserBase.getWildcardQuery(java.lang.String, java.lang.String)
).protected Query
MultiFieldQueryParser. getMultiFieldQuery(java.util.List<Query> queries)
Creates a multifield queryprotected Query
MultiFieldQueryParser. getPrefixQuery(java.lang.String field, java.lang.String termStr)
protected Query
QueryParserBase. getPrefixQuery(java.lang.String field, java.lang.String termStr)
Factory method for generating a query (similar toQueryParserBase.getWildcardQuery(java.lang.String, java.lang.String)
).protected Query
MultiFieldQueryParser. getRangeQuery(java.lang.String field, java.lang.String part1, java.lang.String part2, boolean startInclusive, boolean endInclusive)
protected Query
QueryParserBase. getRangeQuery(java.lang.String field, java.lang.String part1, java.lang.String part2, boolean startInclusive, boolean endInclusive)
protected Query
MultiFieldQueryParser. getRegexpQuery(java.lang.String field, java.lang.String termStr)
protected Query
QueryParserBase. getRegexpQuery(java.lang.String field, java.lang.String termStr)
Factory method for generating a query.protected Query
MultiFieldQueryParser. getWildcardQuery(java.lang.String field, java.lang.String termStr)
protected Query
QueryParserBase. getWildcardQuery(java.lang.String field, java.lang.String termStr)
Factory method for generating a query.(package private) Query
QueryParserBase. handleBareFuzzy(java.lang.String qfield, Token fuzzySlop, java.lang.String termImage)
(package private) Query
QueryParserBase. handleBareTokenQuery(java.lang.String qfield, Token term, Token fuzzySlop, boolean prefix, boolean wildcard, boolean fuzzy, boolean regexp)
(package private) Query
QueryParserBase. handleBoost(Query q, Token boost)
(package private) Query
QueryParserBase. handleQuotedTerm(java.lang.String qfield, Token term, Token fuzzySlop)
Query
QueryParser. MultiTerm(java.lang.String field, java.util.List<BooleanClause> clauses)
Returns the first query if splitOnWhitespace=true or otherwise the entire produced queryprotected Query
QueryParserBase. newFieldQuery(Analyzer analyzer, java.lang.String field, java.lang.String queryText, boolean quoted)
protected Query
QueryParserBase. newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
Builds a new FuzzyQuery instanceprotected Query
QueryParserBase. newMatchAllDocsQuery()
Builds a new MatchAllDocsQuery instanceprotected Query
QueryParserBase. newPrefixQuery(Term prefix)
Builds a new PrefixQuery instanceprotected Query
QueryParserBase. newRangeQuery(java.lang.String field, java.lang.String part1, java.lang.String part2, boolean startInclusive, boolean endInclusive)
Builds a newTermRangeQuery
instanceprotected Query
QueryParserBase. newRegexpQuery(Term regexp)
Builds a new RegexpQuery instanceprotected Query
QueryParserBase. newWildcardQuery(Term t)
Builds a new WildcardQuery instancestatic Query
MultiFieldQueryParser. parse(java.lang.String[] queries, java.lang.String[] fields, Analyzer analyzer)
Parses a query which searches on the fields specified.static Query
MultiFieldQueryParser. parse(java.lang.String[] queries, java.lang.String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.static Query
MultiFieldQueryParser. parse(java.lang.String query, java.lang.String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.Query
QueryParserBase. parse(java.lang.String query)
Parses a query string, returning aQuery
.Query
QueryParser. Query(java.lang.String field)
Query
QueryParser. Term(java.lang.String field)
Query
QueryParser. TopLevelQuery(java.lang.String field)
abstract Query
QueryParserBase. TopLevelQuery(java.lang.String field)
Methods in org.apache.lucene.queryparser.classic with parameters of type Query Modifier and Type Method Description protected void
QueryParserBase. addClause(java.util.List<BooleanClause> clauses, int conj, int mods, Query q)
protected void
QueryParserBase. addMultiTermClauses(java.util.List<BooleanClause> clauses, Query q)
Adds clauses generated from analysis over text containing whitespace.private Query
MultiFieldQueryParser. applySlop(Query q, int slop)
(package private) Query
QueryParserBase. handleBoost(Query q, Token boost)
protected BooleanClause
QueryParserBase. newBooleanClause(Query q, BooleanClause.Occur occur)
Builds a new BooleanClause instanceMethod parameters in org.apache.lucene.queryparser.classic with type arguments of type Query Modifier and Type Method Description protected Query
MultiFieldQueryParser. getMultiFieldQuery(java.util.List<Query> queries)
Creates a multifield query -
Uses of Query in org.apache.lucene.queryparser.complexPhrase
Subclasses of Query in org.apache.lucene.queryparser.complexPhrase Modifier and Type Class Description (package private) static class
ComplexPhraseQueryParser.ComplexPhraseQuery
Fields in org.apache.lucene.queryparser.complexPhrase declared as Query Modifier and Type Field Description private Query[]
ComplexPhraseQueryParser.ComplexPhraseQuery. contents
Methods in org.apache.lucene.queryparser.complexPhrase that return Query Modifier and Type Method Description protected Query
ComplexPhraseQueryParser. getFieldQuery(java.lang.String field, java.lang.String queryText, int slop)
protected Query
ComplexPhraseQueryParser. getFuzzyQuery(java.lang.String field, java.lang.String termStr, float minSimilarity)
protected Query
ComplexPhraseQueryParser. getRangeQuery(java.lang.String field, java.lang.String part1, java.lang.String part2, boolean startInclusive, boolean endInclusive)
protected Query
ComplexPhraseQueryParser. getWildcardQuery(java.lang.String field, java.lang.String termStr)
protected Query
ComplexPhraseQueryParser. newRangeQuery(java.lang.String field, java.lang.String part1, java.lang.String part2, boolean startInclusive, boolean endInclusive)
protected Query
ComplexPhraseQueryParser. newTermQuery(Term term, float boost)
Query
ComplexPhraseQueryParser. parse(java.lang.String query)
Query
ComplexPhraseQueryParser.ComplexPhraseQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.queryparser.ext
Methods in org.apache.lucene.queryparser.ext that return Query Modifier and Type Method Description protected Query
ExtendableQueryParser. getFieldQuery(java.lang.String field, java.lang.String queryText, boolean quoted)
abstract Query
ParserExtension. parse(ExtensionQuery query)
Processes the givenExtensionQuery
and returns a correspondingQuery
instance. -
Uses of Query in org.apache.lucene.queryparser.flexible.standard
Methods in org.apache.lucene.queryparser.flexible.standard that return Query Modifier and Type Method Description static Query
QueryParserUtil. parse(java.lang.String[] queries, java.lang.String[] fields, Analyzer analyzer)
Parses a query which searches on the fields specified.static Query
QueryParserUtil. parse(java.lang.String[] queries, java.lang.String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.static Query
QueryParserUtil. parse(java.lang.String query, java.lang.String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.Query
StandardQueryParser. parse(java.lang.String query, java.lang.String defaultField)
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 Query Modifier and Type Method Description Query
BoostQueryNodeBuilder. build(QueryNode queryNode)
Query
GroupQueryNodeBuilder. build(QueryNode queryNode)
Query
ModifierQueryNodeBuilder. build(QueryNode queryNode)
Query
PhraseQueryNodeBuilder. build(QueryNode queryNode)
Query
PointRangeQueryNodeBuilder. build(QueryNode queryNode)
Query
SlopQueryNodeBuilder. build(QueryNode queryNode)
Query
StandardQueryBuilder. build(QueryNode queryNode)
Query
StandardQueryTreeBuilder. build(QueryNode queryNode)
Query
SynonymQueryNodeBuilder. build(QueryNode queryNode)
-
Uses of Query in org.apache.lucene.queryparser.simple
Fields in org.apache.lucene.queryparser.simple declared as Query Modifier and Type Field Description (package private) Query
SimpleQueryParser.State. top
Methods in org.apache.lucene.queryparser.simple that return Query Modifier and Type Method Description protected Query
SimpleQueryParser. newDefaultQuery(java.lang.String text)
Factory method to generate a standard query (no phrase or prefix operators).protected Query
SimpleQueryParser. newFuzzyQuery(java.lang.String text, int fuzziness)
Factory method to generate a fuzzy query.protected Query
SimpleQueryParser. newPhraseQuery(java.lang.String text, int slop)
Factory method to generate a phrase query with slop.protected Query
SimpleQueryParser. newPrefixQuery(java.lang.String text)
Factory method to generate a prefix query.Query
SimpleQueryParser. parse(java.lang.String queryText)
Parses the query text and returns parsed queryprotected Query
SimpleQueryParser. simplify(BooleanQuery bq)
Helper to simplify boolean queries with 0 or 1 clauseMethods in org.apache.lucene.queryparser.simple with parameters of type Query Modifier and Type Method Description private static BooleanQuery
SimpleQueryParser. addClause(BooleanQuery bq, Query query, BooleanClause.Occur occur)
private void
SimpleQueryParser. buildQueryTree(SimpleQueryParser.State state, Query branch)
-
Uses of Query in org.apache.lucene.queryparser.surround.query
Subclasses of Query in org.apache.lucene.queryparser.surround.query Modifier and Type Class Description (package private) class
DistanceRewriteQuery
(package private) class
RewriteQuery<SQ extends SrndQuery>
(package private) class
SimpleTermRewriteQuery
Methods in org.apache.lucene.queryparser.surround.query that return Query Modifier and Type Method Description Query
DistanceQuery. getSpanNearQuery(IndexReader reader, java.lang.String fieldName, BasicQueryFactory qf)
static Query
SrndBooleanQuery. makeBooleanQuery(java.util.List<Query> queries, BooleanClause.Occur occur)
Query
SrndQuery. makeLuceneQueryField(java.lang.String fieldName, BasicQueryFactory qf)
Query
AndQuery. makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
Query
DistanceQuery. makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
Query
FieldsQuery. makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
Query
NotQuery. makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
Query
OrQuery. makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
Query
SimpleTerm. makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
abstract Query
SrndQuery. makeLuceneQueryFieldNoBoost(java.lang.String fieldName, BasicQueryFactory qf)
Query
FieldsQuery. makeLuceneQueryNoBoost(BasicQueryFactory qf)
Query
DistanceRewriteQuery. rewrite(IndexReader reader)
abstract Query
RewriteQuery. rewrite(IndexReader reader)
Query
SimpleTermRewriteQuery. rewrite(IndexReader reader)
Methods in org.apache.lucene.queryparser.surround.query that return types with arguments of type Query Modifier and Type Method Description java.util.List<Query>
ComposedQuery. makeLuceneSubQueriesField(java.lang.String fn, BasicQueryFactory qf)
Methods in org.apache.lucene.queryparser.surround.query with parameters of type Query Modifier and Type Method Description void
SpanNearClauseFactory. addSpanQuery(Query q)
Method parameters in org.apache.lucene.queryparser.surround.query with type arguments of type Query Modifier and Type Method Description static void
SrndBooleanQuery. addQueriesToBoolean(BooleanQuery.Builder bq, java.util.List<Query> queries, BooleanClause.Occur occur)
static Query
SrndBooleanQuery. makeBooleanQuery(java.util.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 Modifier and Type Method Description Query
CoreParser. getQuery(org.w3c.dom.Element e)
Query
QueryBuilder. getQuery(org.w3c.dom.Element e)
Query
QueryBuilderFactory. getQuery(org.w3c.dom.Element n)
Query
CoreParser. parse(java.io.InputStream xmlStream)
Parses the given stream as XML file and returns aQuery
. -
Uses of Query in org.apache.lucene.queryparser.xml.builders
Methods in org.apache.lucene.queryparser.xml.builders that return Query Modifier and Type Method Description Query
BooleanQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
ConstantScoreQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
DisjunctionMaxQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
FuzzyLikeThisQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
LikeThisQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
MatchAllDocsQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
PointRangeQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
RangeQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
SpanBuilderBase. getQuery(org.w3c.dom.Element e)
Query
SpanQueryBuilderFactory. getQuery(org.w3c.dom.Element e)
Query
TermQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
TermsQueryBuilder. getQuery(org.w3c.dom.Element e)
Query
UserInputQueryBuilder. getQuery(org.w3c.dom.Element e)
-
Uses of Query in org.apache.lucene.sandbox.queries
Subclasses of Query in org.apache.lucene.sandbox.queries Modifier and Type Class Description class
FuzzyLikeThisQuery
Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms.Methods in org.apache.lucene.sandbox.queries that return Query Modifier and Type Method Description private Query
FuzzyLikeThisQuery. newTermQuery(IndexReader reader, Term term)
Query
FuzzyLikeThisQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.search
Subclasses of Query in org.apache.lucene.search Modifier and Type Class Description class
AutomatonQuery
AQuery
that will match terms against a finite-state machine.class
BlendedTermQuery
AQuery
that blends index statistics across multiple terms.class
BM25FQuery
AQuery
that treats multiple fields as a single stream and scores terms as if you had indexed them as a single term in a single field.class
BooleanQuery
A Query that matches documents matching boolean combinations of other queries, e.g.class
BoostQuery
AQuery
wrapper that allows to give a boost to the wrapped query.class
ConstantScoreQuery
A query that wraps another query and simply returns a constant score equal to 1 for every document that matches the query.class
CoveringQuery
AQuery
that allows to have a configurable number or required matches per document.class
DisjunctionMaxQuery
A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.class
DocValuesFieldExistsQuery
AQuery
that matches documents that have a value for a given field as reported by doc values iterators.class
DocValuesNumbersQuery
LikeDocValuesTermsQuery
, but this query only runs on a longNumericDocValuesField
or aSortedNumericDocValuesField
, matching all documents whose value in the specified field is contained in the provided set of long values.(package private) static class
DocValuesRewriteMethod.MultiTermQueryDocValuesWrapper
class
DocValuesTermsQuery
AQuery
that only accepts documents whose term value in the specified field is contained in the provided set of allowed terms.class
FuzzyQuery
Implements the fuzzy search query.class
IndexOrDocValuesQuery
A query that uses either an index structure (points or terms) or doc values in order to run a query, depending which one is more efficient.class
IndexSortSortedNumericDocValuesRangeQuery
A range query that can take advantage of the fact that the index is sorted to speed up execution.class
MatchAllDocsQuery
A query that matches all documents.class
MatchNoDocsQuery
A query that matches no documents.class
MultiPhraseQuery
A generalized version ofPhraseQuery
, with the possibility of adding more than one term at the same position that are treated as a disjunction (OR).class
MultiRangeQuery
Abstract class for range queries involving multiple ranges against physical points such asIntPoints
All ranges are logically ORed together TODO: Add capability for handling overlapping ranges at rewrite timeclass
MultiTermQuery
An abstractQuery
that matches documents containing a subset of terms provided by aFilteredTermsEnum
enumeration.(package private) class
MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery>
This class also provides the functionality behindMultiTermQuery.CONSTANT_SCORE_REWRITE
.private static class
NamedMatches.NamedQuery
class
NGramPhraseQuery
This is aPhraseQuery
which is optimized for n-gram phrase query.class
NormsFieldExistsQuery
AQuery
that matches documents that have a value for a given field as reported by field norms.class
PhraseQuery
A Query that matches documents containing a particular sequence of terms.class
PhraseWildcardQuery
A generalized version ofPhraseQuery
, built with one or moreMultiTermQuery
that provides term expansions for multi-terms (one of the expanded terms must match).class
PointInSetQuery
Abstract query class to find all documents whose single or multi-dimensional point values, previously indexed with e.g.class
PointRangeQuery
Abstract class for range queries against single or multidimensional points such asIntPoint
.class
PrefixQuery
A Query that matches documents containing terms with a specified prefix.class
RegexpQuery
A fast regular expression query based on theorg.apache.lucene.util.automaton
package.class
SynonymQuery
A query that treats multiple terms as synonyms.class
TermAutomatonQuery
A proximity query that lets you express an automaton, whose transitions are terms, to match documents.class
TermInSetQuery
Specialization for a disjunction over many terms that behaves like aConstantScoreQuery
over aBooleanQuery
containing onlyBooleanClause.Occur.SHOULD
clauses.class
TermQuery
A Query that matches documents containing a term.class
TermRangeQuery
A Query that matches documents within an range of terms.class
WildcardQuery
Implements the wildcard search query.Fields in org.apache.lucene.search declared as Query Modifier and Type Field Description private Query[]
DisjunctionMaxQuery. disjuncts
private Query
IndexOrDocValuesQuery. dvQuery
private Query
IndexSortSortedNumericDocValuesRangeQuery. fallbackQuery
private Query
NamedMatches.NamedQuery. in
private Query
IndexOrDocValuesQuery. indexQuery
protected static Query
PhraseWildcardQuery. NO_MATCH_QUERY
protected Query
Weight. parentQuery
private Query
BooleanClause. query
The query whose matching documents are combined by the boolean query.private Query
BoostQuery. query
private Query
ConstantScoreQuery. query
private Query
DisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator. query
private Query
DoubleValuesSource.QueryDoubleValuesSource. query
private Query
QueryRescorer. query
private Query
TermMatchesIterator. query
Fields in org.apache.lucene.search with type parameters of type Query Modifier and Type Field Description private java.util.Map<Query,DocIdSet>
LRUQueryCache.LeafCache. cache
private java.util.Map<BooleanClause.Occur,java.util.Collection<Query>>
BooleanQuery. clauseSets
private java.util.Set<Query>
LRUQueryCache. mostRecentlyUsedQueries
private java.util.Collection<Query>
CoveringQuery. queries
private java.util.Map<Query,Query>
LRUQueryCache. uniqueQueries
private java.util.Map<Query,Query>
LRUQueryCache. uniqueQueries
Methods in org.apache.lucene.search that return Query Modifier and Type Method Description protected Query
MultiTermQuery.TopTermsBlendedFreqScoringRewrite. build(BlendedTermQuery.Builder builder)
protected Query
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite. build(BooleanQuery.Builder builder)
protected Query
MultiTermQuery.TopTermsScoringBooleanQueryRewrite. build(BooleanQuery.Builder builder)
protected abstract Query
TermCollectingRewrite. build(B builder)
Finalize the creation of the query from the builder.Query
IndexSortSortedNumericDocValuesRangeQuery. getFallbackQuery()
Query
IndexOrDocValuesQuery. getIndexQuery()
Return the wrapped query that may be costly to initialize but has a good iterator.Query
BooleanClause. getQuery()
Query
BoostQuery. getQuery()
Return the wrappedQuery
.Query
ConstantScoreQuery. getQuery()
Returns the encapsulated query.Query
DisjunctionMatchesIterator. getQuery()
Query
DisjunctionMatchesIterator.TermsEnumDisjunctionMatchesIterator. getQuery()
Query
FilterMatchesIterator. getQuery()
Query
MatchesIterator. getQuery()
Returns the Query causing the current match If thisMatchesIterator
has been returned from aMatchesIterator.getSubMatches()
call, then returns aTermQuery
equivalent to the current match Should only be called afterMatchesIterator.next()
has returnedtrue
protected Query
PhraseWildcardQuery.MultiTerm. getQuery()
protected abstract Query
PhraseWildcardQuery.PhraseTerm. getQuery()
protected Query
PhraseWildcardQuery.SingleTerm. getQuery()
Query
TermMatchesIterator. getQuery()
Query
Weight. getQuery()
The query that this concerns.Query
IndexOrDocValuesQuery. getRandomAccessQuery()
Return the wrapped query that may be slow at identifying all matching documents, but which is cheap to initialize and can efficiently verify that some documents match.Query
BlendedTermQuery.DisjunctionMaxRewrite. rewrite(Query[] subQueries)
Query
BlendedTermQuery. rewrite(IndexReader reader)
abstract Query
BlendedTermQuery.RewriteMethod. rewrite(Query[] subQueries)
Merge the provided sub queries into a singleQuery
object.Query
BM25FQuery. rewrite(IndexReader reader)
Query
BooleanQuery. rewrite(IndexReader reader)
Query
BoostQuery. rewrite(IndexReader reader)
Query
ConstantScoreQuery. rewrite(IndexReader reader)
Query
CoveringQuery. rewrite(IndexReader reader)
Query
DisjunctionMaxQuery. rewrite(IndexReader reader)
Optimize our representation and our subqueries representationsQuery
DocValuesRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)
Query
IndexOrDocValuesQuery. rewrite(IndexReader reader)
Query
IndexSearcher. rewrite(Query original)
Expert: called to re-write queries into primitive queries.Query
IndexSortSortedNumericDocValuesRangeQuery. rewrite(IndexReader reader)
Query
MultiPhraseQuery. rewrite(IndexReader reader)
Query
MultiTermQuery. rewrite(IndexReader reader)
To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getTermsEnum(Terms, AttributeSource)
.abstract Query
MultiTermQuery.RewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)
Query
NamedMatches.NamedQuery. rewrite(IndexReader reader)
Query
NGramPhraseQuery. rewrite(IndexReader reader)
Query
PhraseQuery. rewrite(IndexReader reader)
Query
PhraseWildcardQuery. rewrite(IndexReader reader)
Query
Query. rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.Query
ScoringRewrite. rewrite(IndexReader reader, MultiTermQuery query)
Query
SynonymQuery. rewrite(IndexReader reader)
Query
TermAutomatonQuery. rewrite(IndexReader reader)
Query
TermInSetQuery. rewrite(IndexReader reader)
Query
TopTermsRewrite. rewrite(IndexReader reader, MultiTermQuery query)
static Query
NamedMatches. wrapQuery(java.lang.String name, Query in)
Wrap a Query so that it associates a name with itsMatches
Methods in org.apache.lucene.search that return types with arguments of type Query Modifier and Type Method Description (package private) java.util.List<Query>
LRUQueryCache. cachedQueries()
(package private) java.util.Collection<Query>
BooleanQuery. getClauses(BooleanClause.Occur occur)
Return the collection of queries for the givenBooleanClause.Occur
.java.util.List<Query>
DisjunctionMaxQuery. getDisjuncts()
java.util.Iterator<Query>
DisjunctionMaxQuery. iterator()
Methods in org.apache.lucene.search with parameters of type Query Modifier and Type Method Description BooleanQuery.Builder
BooleanQuery.Builder. add(Query query, BooleanClause.Occur occur)
Add a new clause to thisBooleanQuery.Builder
.void
LRUQueryCache. clearQuery(Query query)
Remove all cache entries for the given query.void
QueryVisitor. consumeTerms(Query query, Term... terms)
Called by leaf queries that match on specific termsvoid
QueryVisitor. consumeTermsMatching(Query query, java.lang.String field, java.util.function.Supplier<ByteRunAutomaton> automaton)
Called by leaf queries that match on a class of termsint
IndexSearcher. count(Query query)
Count how many documents match the given query.Weight
IndexSearcher. createWeight(Query query, ScoreMode scoreMode, float boost)
Creates aWeight
for the given query, potentially adding caching if possible and configured.static MatchesIterator
MatchesUtils. disjunction(LeafReaderContext context, int doc, Query query, java.lang.String field, BytesRefIterator terms)
Create a MatchesIterator that is a disjunction over a list of terms extracted from aBytesRefIterator
.Explanation
IndexSearcher. explain(Query query, int doc)
Returns an Explanation that describes howdoc
scored againstquery
.(package private) int
UsageTrackingQueryCachingPolicy. frequency(Query query)
static DoubleValuesSource
DoubleValuesSource. fromQuery(Query query)
Create a DoubleValuesSource that returns the score of a particular query(package private) static MatchesIterator
DisjunctionMatchesIterator. fromTerms(LeafReaderContext context, int doc, Query query, java.lang.String field, java.util.List<Term> terms)
Create aDisjunctionMatchesIterator
over a list of terms Only terms that have at least one match in the given document will be included(package private) static MatchesIterator
DisjunctionMatchesIterator. fromTermsEnum(LeafReaderContext context, int doc, Query query, java.lang.String field, BytesRefIterator terms)
Create aDisjunctionMatchesIterator
over a list of terms extracted from aBytesRefIterator
Only terms that have at least one match in the given document will be included(package private) DocIdSet
LRUQueryCache. get(Query key, IndexReader.CacheHelper cacheHelper)
(package private) DocIdSet
LRUQueryCache.LeafCache. get(Query query)
QueryVisitor
QueryVisitor. getSubVisitor(BooleanClause.Occur occur, Query parent)
Pulls a visitor instance for visiting child clauses of a query The default implementation returnsthis
, unlessoccur
is equal toBooleanClause.Occur.MUST_NOT
in which case it returnsQueryVisitor.EMPTY_VISITOR
(package private) static boolean
UsageTrackingQueryCachingPolicy. isCostly(Query query)
private static boolean
UsageTrackingQueryCachingPolicy. isPointQuery(Query query)
protected int
UsageTrackingQueryCachingPolicy. minFrequencyToCache(Query query)
For a given filter, return how many times it should appear in the history before being cached.private void
LRUQueryCache. onEviction(Query singleton)
protected void
LRUQueryCache. onHit(java.lang.Object readerCoreKey, Query query)
Expert: callback when there is a cache hit on a given query.protected void
LRUQueryCache. onMiss(java.lang.Object readerCoreKey, Query query)
Expert: callback when there is a cache miss on a given query.protected void
LRUQueryCache. onQueryCache(Query query, long ramBytesUsed)
Expert: callback when a query is added to this cache.protected void
LRUQueryCache. onQueryEviction(Query query, long ramBytesUsed)
Expert: callback when a query is evicted from this cache.void
QueryCachingPolicy. onUse(Query query)
Callback that is called every time that a cached filter is used.void
UsageTrackingQueryCachingPolicy. onUse(Query query)
static void
TopFieldCollector. populateScores(ScoreDoc[] topDocs, IndexSearcher searcher, Query query)
Populatescores
of the giventopDocs
.(package private) void
LRUQueryCache.LeafCache. putIfAbsent(Query query, DocIdSet set)
private void
LRUQueryCache. putIfAbsent(Query query, DocIdSet set, IndexReader.CacheHelper cacheHelper)
(package private) void
LRUQueryCache.LeafCache. remove(Query query)
static TopDocs
QueryRescorer. rescore(IndexSearcher searcher, TopDocs topDocs, Query query, double weight, int topN)
Sugar API, calling {#rescore} using a simple linear combination of firstPassScore + weight * secondPassScoreQuery
BlendedTermQuery.DisjunctionMaxRewrite. rewrite(Query[] subQueries)
abstract Query
BlendedTermQuery.RewriteMethod. rewrite(Query[] subQueries)
Merge the provided sub queries into a singleQuery
object.Query
IndexSearcher. rewrite(Query original)
Expert: called to re-write queries into primitive queries.TopDocs
IndexSearcher. search(Query query, int n)
Finds the topn
hits forquery
.TopFieldDocs
IndexSearcher. search(Query query, int n, Sort sort)
Search implementation with arbitrary sorting.TopFieldDocs
IndexSearcher. search(Query query, int n, Sort sort, boolean doDocScores)
Search implementation with arbitrary sorting, plus control over whether hit scores and max score should be computed.void
IndexSearcher. search(Query query, Collector results)
Lower-level search API.<C extends Collector,T>
TIndexSearcher. search(Query query, CollectorManager<C,T> collectorManager)
Lower-level search API.private TopFieldDocs
IndexSearcher. searchAfter(FieldDoc after, Query query, int numHits, Sort sort, boolean doDocScores)
TopDocs
IndexSearcher. searchAfter(ScoreDoc after, Query query, int numHits)
Finds the topn
hits forquery
where all results are after a previous result (after
).TopDocs
IndexSearcher. searchAfter(ScoreDoc after, Query query, int n, Sort sort)
Finds the topn
hits forquery
where all results are after a previous result (after
).TopFieldDocs
IndexSearcher. searchAfter(ScoreDoc after, Query query, int numHits, Sort sort, boolean doDocScores)
Finds the topn
hits forquery
where all results are after a previous result (after
), allowing control over whether hit scores and max score should be computed.boolean
QueryCachingPolicy. shouldCache(Query query)
Whether the givenQuery
is worth caching.boolean
UsageTrackingQueryCachingPolicy. shouldCache(Query query)
private static boolean
UsageTrackingQueryCachingPolicy. shouldNeverCache(Query query)
void
QueryVisitor. visitLeaf(Query query)
Called by leaf queries that do not match on termsstatic Query
NamedMatches. wrapQuery(java.lang.String name, Query in)
Wrap a Query so that it associates a name with itsMatches
Constructors in org.apache.lucene.search with parameters of type Query Constructor Description BM25FWeight(Query query, IndexSearcher searcher, ScoreMode scoreMode, float boost)
BooleanClause(Query query, BooleanClause.Occur occur)
Constructs a BooleanClause.BoostQuery(Query query, float boost)
Sole constructor: wrapquery
in such a way that the produced scores will be boosted byboost
.ConstantScoreQuery(Query query)
Strips off scores from the passed in Query.ConstantScoreWeight(Query query, float score)
CoveringWeight(Query query, java.util.Collection<Weight> weights, LongValuesSource minimumNumberMatch)
FilterWeight(Query query, Weight weight)
Alternative constructor.IndexOrDocValuesQuery(Query indexQuery, Query dvQuery)
Create anIndexOrDocValuesQuery
.IndexSortSortedNumericDocValuesRangeQuery(java.lang.String field, long lowerValue, long upperValue, Query fallbackQuery)
Creates a newIndexSortSortedNumericDocValuesRangeQuery
.NamedQuery(java.lang.String name, Query in)
PhraseWeight(Query query, java.lang.String field, IndexSearcher searcher, ScoreMode scoreMode)
QueryDoubleValuesSource(Query query)
QueryRescorer(Query query)
Sole constructor, passing the 2nd pass query to assign scores to the 1st pass hits.SynonymWeight(Query query, IndexSearcher searcher, ScoreMode scoreMode, float boost)
TermMatchesIterator(Query query, PostingsEnum pe)
Create a newTermMatchesIterator
for the given term and postings listTermsEnumDisjunctionMatchesIterator(MatchesIterator first, BytesRefIterator terms, TermsEnum te, int doc, Query query)
Weight(Query query)
Sole constructor, typically invoked by sub-classes.Constructor parameters in org.apache.lucene.search with type arguments of type Query Constructor Description CoveringQuery(java.util.Collection<Query> queries, LongValuesSource minimumNumberMatch)
Sole constructor.DisjunctionMaxQuery(java.util.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 Query Modifier and Type Field Description private Query
GroupingSearch. groupEndDocs
Methods in org.apache.lucene.search.grouping with parameters of type Query Modifier and Type Method Description protected TopGroups<?>
GroupingSearch. groupByDocBlock(IndexSearcher searcher, Query query, int groupOffset, int groupLimit)
protected TopGroups
GroupingSearch. groupByFieldOrFunction(IndexSearcher searcher, Query query, int groupOffset, int groupLimit)
<T> TopGroups<T>
GroupingSearch. search(IndexSearcher searcher, Query query, int groupOffset, int groupLimit)
Executes a grouped search.Constructors in org.apache.lucene.search.grouping with parameters of type Query Constructor Description GroupingSearch(GroupSelector<?> grouper, Query groupEndDocs)
GroupingSearch(Query groupEndDocs)
Constructor for grouping documents by doc block. -
Uses of Query in org.apache.lucene.search.highlight
Fields in org.apache.lucene.search.highlight declared as Query Modifier and Type Field Description private Query
QueryScorer. query
Methods in org.apache.lucene.search.highlight with parameters of type Query Modifier and Type Method Description void
QueryTermExtractor.BoostedTermExtractor. consumeTerms(Query query, Term... terms)
protected void
WeightedSpanTermExtractor. extract(Query query, float boost, java.util.Map<java.lang.String,WeightedSpanTerm> terms)
protected void
WeightedSpanTermExtractor. extractUnknownQuery(Query query, java.util.Map<java.lang.String,WeightedSpanTerm> terms)
protected void
WeightedSpanTermExtractor. extractWeightedTerms(java.util.Map<java.lang.String,WeightedSpanTerm> terms, Query query, float boost)
static WeightedTerm[]
QueryTermExtractor. getIdfWeightedTerms(Query query, IndexReader reader, java.lang.String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTermsQueryVisitor
QueryTermExtractor.BoostedTermExtractor. getSubVisitor(BooleanClause.Occur occur, Query parent)
static WeightedTerm[]
QueryTermExtractor. getTerms(Query query)
Extracts all terms texts of a given Query into an array of WeightedTermsstatic WeightedTerm[]
QueryTermExtractor. getTerms(Query query, boolean prohibited)
Extracts all terms texts of a given Query into an array of WeightedTermsstatic WeightedTerm[]
QueryTermExtractor. getTerms(Query query, boolean prohibited, java.lang.String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTermsjava.util.Map<java.lang.String,WeightedSpanTerm>
WeightedSpanTermExtractor. getWeightedSpanTerms(Query query, float boost, TokenStream tokenStream)
Creates a Map ofWeightedSpanTerms
from the givenQuery
andTokenStream
.java.util.Map<java.lang.String,WeightedSpanTerm>
WeightedSpanTermExtractor. getWeightedSpanTerms(Query query, float boost, TokenStream tokenStream, java.lang.String fieldName)
Creates a Map ofWeightedSpanTerms
from the givenQuery
andTokenStream
.java.util.Map<java.lang.String,WeightedSpanTerm>
WeightedSpanTermExtractor. getWeightedSpanTermsWithScores(Query query, float boost, TokenStream tokenStream, java.lang.String fieldName, IndexReader reader)
Creates a Map ofWeightedSpanTerms
from the givenQuery
andTokenStream
.private void
QueryScorer. init(Query query, java.lang.String field, IndexReader reader, boolean expandMultiTermQuery)
Method parameters in org.apache.lucene.search.highlight with type arguments of type Query Modifier and Type Method Description protected boolean
WeightedSpanTermExtractor. isQueryUnsupported(java.lang.Class<? extends Query> clazz)
Constructors in org.apache.lucene.search.highlight with parameters of type Query Constructor Description QueryScorer(Query query)
QueryScorer(Query query, java.lang.String field)
QueryScorer(Query query, java.lang.String field, java.lang.String defaultField)
QueryScorer(Query query, IndexReader reader, java.lang.String field)
QueryScorer(Query query, IndexReader reader, java.lang.String field, java.lang.String defaultField)
QueryTermScorer(Query query)
QueryTermScorer(Query query, java.lang.String fieldName)
QueryTermScorer(Query query, IndexReader reader, java.lang.String fieldName)
-
Uses of Query in org.apache.lucene.search.join
Subclasses of Query in org.apache.lucene.search.join Modifier and Type Class Description (package private) class
GlobalOrdinalsQuery
(package private) class
GlobalOrdinalsWithScoreQuery
class
ParentChildrenBlockJoinQuery
A query that returns all the matching child documents for a specific parent document indexed together in the same block.(package private) class
PointInSetIncludingScoreQuery
(package private) class
TermsIncludingScoreQuery
(package private) class
TermsQuery
A query that has an array of terms from a specific field.class
ToChildBlockJoinQuery
Just likeToParentBlockJoinQuery
, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.class
ToParentBlockJoinQuery
This query requires that you index children and parent docs as a single block, using theIndexWriter.addDocuments()
orIndexWriter.updateDocuments()
API.Fields in org.apache.lucene.search.join declared as Query Modifier and Type Field Description private Query
ParentChildrenBlockJoinQuery. childQuery
private Query
ToParentBlockJoinQuery. childQuery
private Query
GlobalOrdinalsQuery. fromQuery
private Query
GlobalOrdinalsWithScoreQuery. fromQuery
private Query
TermsIncludingScoreQuery. fromQuery
private Query
TermsQuery. fromQuery
(package private) Query
PointInSetIncludingScoreQuery. originalQuery
private Query
ToChildBlockJoinQuery. parentQuery
private Query
QueryBitSetProducer. query
private Query
GlobalOrdinalsQuery. toQuery
private Query
GlobalOrdinalsWithScoreQuery. toQuery
Methods in org.apache.lucene.search.join that return Query Modifier and Type Method Description private static Query
JoinUtil. createJoinQuery(boolean multipleValuesPerDocument, java.lang.String toField, Query fromQuery, java.lang.String fromField, IndexSearcher fromSearcher, ScoreMode scoreMode, GenericTermsCollector collector)
static Query
JoinUtil. createJoinQuery(java.lang.String fromField, boolean multipleValuesPerDocument, java.lang.String toField, java.lang.Class<? extends java.lang.Number> numericType, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode)
Method for query time joining for numeric fields.static Query
JoinUtil. createJoinQuery(java.lang.String fromField, boolean multipleValuesPerDocument, java.lang.String toField, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode)
Method for query time joining.static Query
JoinUtil. createJoinQuery(java.lang.String joinField, Query fromQuery, Query toQuery, IndexSearcher searcher, ScoreMode scoreMode, OrdinalMap ordinalMap)
Delegates toJoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, OrdinalMap, int, int)
, but disables the min and max filtering.static Query
JoinUtil. createJoinQuery(java.lang.String joinField, Query fromQuery, Query toQuery, IndexSearcher searcher, ScoreMode scoreMode, OrdinalMap ordinalMap, int min, int max)
A query time join using global ordinals over a dedicated join field.Query
ToParentBlockJoinQuery. getChildQuery()
Return our child query.Query
ToChildBlockJoinQuery. getParentQuery()
Return our parent query.Query
QueryBitSetProducer. getQuery()
Gets the contained query.Query
ParentChildrenBlockJoinQuery. rewrite(IndexReader reader)
Query
ToChildBlockJoinQuery. rewrite(IndexReader reader)
Query
ToParentBlockJoinQuery. rewrite(IndexReader reader)
Methods in org.apache.lucene.search.join with parameters of type Query Modifier and Type Method Description private static Query
JoinUtil. createJoinQuery(boolean multipleValuesPerDocument, java.lang.String toField, Query fromQuery, java.lang.String fromField, IndexSearcher fromSearcher, ScoreMode scoreMode, GenericTermsCollector collector)
static Query
JoinUtil. createJoinQuery(java.lang.String fromField, boolean multipleValuesPerDocument, java.lang.String toField, java.lang.Class<? extends java.lang.Number> numericType, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode)
Method for query time joining for numeric fields.static Query
JoinUtil. createJoinQuery(java.lang.String fromField, boolean multipleValuesPerDocument, java.lang.String toField, Query fromQuery, IndexSearcher fromSearcher, ScoreMode scoreMode)
Method for query time joining.static Query
JoinUtil. createJoinQuery(java.lang.String joinField, Query fromQuery, Query toQuery, IndexSearcher searcher, ScoreMode scoreMode, OrdinalMap ordinalMap)
Delegates toJoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, OrdinalMap, int, int)
, but disables the min and max filtering.static Query
JoinUtil. createJoinQuery(java.lang.String joinField, Query fromQuery, Query toQuery, IndexSearcher searcher, ScoreMode scoreMode, OrdinalMap ordinalMap, int min, int max)
A query time join using global ordinals over a dedicated join field.Constructors in org.apache.lucene.search.join with parameters of type Query Constructor Description BlockJoinWeight(Query joinQuery, Weight childWeight, BitSetProducer parentsFilter, ScoreMode scoreMode)
GlobalOrdinalsQuery(LongBitSet foundOrds, java.lang.String joinField, OrdinalMap globalOrds, Query toQuery, Query fromQuery, java.lang.Object indexReaderContextId)
GlobalOrdinalsWithScoreQuery(GlobalOrdinalsWithScoreCollector collector, ScoreMode scoreMode, java.lang.String joinField, OrdinalMap globalOrds, Query toQuery, Query fromQuery, int min, int max, java.lang.Object indexReaderContextId)
ParentChildrenBlockJoinQuery(BitSetProducer parentFilter, Query childQuery, int parentDocId)
Creates aParentChildrenBlockJoinQuery
instancePointInSetIncludingScoreQuery(ScoreMode scoreMode, Query originalQuery, boolean multipleValuesPerDocument, java.lang.String field, int bytesPerDim, PointInSetIncludingScoreQuery.Stream packedPoints)
QueryBitSetProducer(Query query)
Wraps another query's result and caches it into bitsets.TermsIncludingScoreQuery(ScoreMode scoreMode, java.lang.String toField, boolean multipleValuesPerDocument, BytesRefHash terms, float[] scores, java.lang.String fromField, Query fromQuery, java.lang.Object indexReaderContextId)
TermsQuery(java.lang.String toField, BytesRefHash terms, java.lang.String fromField, Query fromQuery, java.lang.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.W(Query query, Weight approximationWeight, float boost)
W(Query query, Weight approximationWeight)
-
Uses of Query in org.apache.lucene.search.spans
Subclasses of Query in org.apache.lucene.search.spans Modifier and Type Class Description class
FieldMaskingSpanQuery
Wrapper to allowSpanQuery
objects participate in composite single-field SpanQueries by 'lying' about their search field.class
SpanBoostQuery
Counterpart ofBoostQuery
for spans.class
SpanContainingQuery
Keep matches that contain another SpanScorer.(package private) class
SpanContainQuery
class
SpanFirstQuery
Matches spans near the beginning of a field.class
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
Wraps anyMultiTermQuery
as aSpanQuery
, so it can be nested within other SpanQuery classes.class
SpanNearQuery
Matches spans which are near one another.private static class
SpanNearQuery.SpanGapQuery
class
SpanNotQuery
Removes matches which overlap with another SpanQuery or which are within x tokens before or y tokens after another SpanQuery.class
SpanOrQuery
Matches the union of its clauses.class
SpanPositionCheckQuery
Base class for filtering a SpanQuery based on the position of a match.class
SpanPositionRangeQuery
Checks to see if theSpanPositionCheckQuery.getMatch()
lies between a start and end position SeeSpanFirstQuery
for a derivation that is optimized for the case where start position is 0.class
SpanQuery
Base class for span-based queries.class
SpanTermQuery
Matches spans containing a term.class
SpanWithinQuery
Keep matches that are contained within another Spans.Methods in org.apache.lucene.search.spans that return Query Modifier and Type Method Description Query
SpanMultiTermQueryWrapper. getWrappedQuery()
Returns the wrapped queryQuery
FieldMaskingSpanQuery. rewrite(IndexReader reader)
Query
SpanBoostQuery. rewrite(IndexReader reader)
Query
SpanContainQuery. rewrite(IndexReader reader)
Query
SpanMultiTermQueryWrapper. rewrite(IndexReader reader)
Query
SpanNearQuery. rewrite(IndexReader reader)
Query
SpanNotQuery. rewrite(IndexReader reader)
Query
SpanOrQuery. rewrite(IndexReader reader)
Query
SpanPositionCheckQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.search.suggest.analyzing
Methods in org.apache.lucene.search.suggest.analyzing that return Query Modifier and Type Method Description protected Query
AnalyzingInfixSuggester. finishQuery(BooleanQuery.Builder in, boolean allTermsRequired)
Subclass can override this to tweak the Query before searching.protected Query
AnalyzingInfixSuggester. getLastTokenQuery(java.lang.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.document Modifier and Type Class Description class
CompletionQuery
AbstractQuery
that match documents containing terms with a specified prefix filtered byBitsProducer
.class
ContextQuery
ACompletionQuery
that matches documents specified by a wrappedCompletionQuery
supporting boosting and/or filtering by specified contexts.class
FuzzyCompletionQuery
ACompletionQuery
that match documents containing terms within an edit distance of the specified prefix.class
PrefixCompletionQuery
ACompletionQuery
which takes anAnalyzer
to analyze the prefix of the query term.class
RegexCompletionQuery
ACompletionQuery
which takes a regular expression as the prefix of the query term.Methods in org.apache.lucene.search.suggest.document that return Query Modifier and Type Method Description Query
CompletionQuery. rewrite(IndexReader reader)
-
Uses of Query in org.apache.lucene.search.uhighlight
Fields in org.apache.lucene.search.uhighlight declared as Query Modifier and Type Field Description private Query
UHComponents. query
Fields in org.apache.lucene.search.uhighlight with type parameters of type Query Modifier and Type Field Description private java.util.HashMap<Query,BytesRef>
OffsetsEnum.OfMatchesIteratorWithSubs. queryToTermMap
Methods in org.apache.lucene.search.uhighlight that return Query Modifier and Type Method Description Query
UHComponents. getQuery()
Methods in org.apache.lucene.search.uhighlight that return types with arguments of type Query Modifier and Type Method Description protected java.util.Collection<Query>
UnifiedHighlighter. preSpanQueryRewrite(Query query)
When highlighting phrases accurately, we may need to handle custom queries that aren't supported in theWeightedSpanTermExtractor
as called by thePhraseHelper
.Methods in org.apache.lucene.search.uhighlight with parameters of type Query Modifier and Type Method Description static boolean
MultiTermHighlighting. canExtractAutomataFromLeafQuery(Query query)
Indicates if the the leaf query (fromQueryVisitor.visitLeaf(Query)
) is a type of query that we can extract automata from.void
MultiTermHighlighting.AutomataCollector. consumeTermsMatching(Query query, java.lang.String field, java.util.function.Supplier<ByteRunAutomaton> automaton)
(package private) static LabelledCharArrayMatcher[]
MultiTermHighlighting. extractAutomata(Query query, java.util.function.Predicate<java.lang.String> fieldMatcher, boolean lookInSpan)
Extracts MultiTermQueries that match the provided field predicate.protected static java.util.Set<Term>
UnifiedHighlighter. extractTerms(Query query)
Extracts matching terms after rewriting against an empty indexprotected LabelledCharArrayMatcher[]
UnifiedHighlighter. getAutomata(java.lang.String field, Query query, java.util.Set<UnifiedHighlighter.HighlightFlag> highlightFlags)
protected FieldHighlighter
UnifiedHighlighter. getFieldHighlighter(java.lang.String field, Query query, java.util.Set<Term> allTerms, int maxPassages)
protected UHComponents
UnifiedHighlighter. getHighlightComponents(java.lang.String field, Query query, java.util.Set<Term> allTerms)
protected PhraseHelper
UnifiedHighlighter. getPhraseHelper(java.lang.String field, Query query, java.util.Set<UnifiedHighlighter.HighlightFlag> highlightFlags)
QueryVisitor
MultiTermHighlighting.AutomataCollector. getSubVisitor(BooleanClause.Occur occur, Query parent)
protected boolean
UnifiedHighlighter. hasUnrecognizedQuery(java.util.function.Predicate<java.lang.String> fieldMatcher, Query query)
java.lang.String[]
UnifiedHighlighter. highlight(java.lang.String field, Query query, TopDocs topDocs)
Highlights the top passages from a single field.java.lang.String[]
UnifiedHighlighter. highlight(java.lang.String field, Query query, TopDocs topDocs, int maxPassages)
Highlights the top-N passages from a single field.java.util.Map<java.lang.String,java.lang.String[]>
UnifiedHighlighter. highlightFields(java.lang.String[] fieldsIn, Query query, int[] docidsIn, int[] maxPassagesIn)
Highlights the top-N passages from multiple fields, for the provided int[] docids.java.util.Map<java.lang.String,java.lang.String[]>
UnifiedHighlighter. highlightFields(java.lang.String[] fields, Query query, TopDocs topDocs)
Highlights the top passages from multiple fields.java.util.Map<java.lang.String,java.lang.String[]>
UnifiedHighlighter. highlightFields(java.lang.String[] fields, Query query, TopDocs topDocs, int[] maxPassages)
Highlights the top-N passages from multiple fields.protected java.util.Map<java.lang.String,java.lang.Object[]>
UnifiedHighlighter. highlightFieldsAsObjects(java.lang.String[] fieldsIn, Query query, int[] docIdsIn, int[] maxPassagesIn)
Expert: highlights the top-N passages from multiple fields, for the provided int[] docids, to custom Object as returned by thePassageFormatter
.java.lang.Object
UnifiedHighlighter. highlightWithoutSearcher(java.lang.String field, Query query, java.lang.String content, int maxPassages)
Highlights text passed as a parameter.protected java.util.Collection<Query>
UnifiedHighlighter. preSpanQueryRewrite(Query query)
When highlighting phrases accurately, we may need to handle custom queries that aren't supported in theWeightedSpanTermExtractor
as called by thePhraseHelper
.private BytesRef
OffsetsEnum.OfMatchesIteratorWithSubs. queryToTerm(Query query)
Maps a Query fromMatchesIterator.getQuery()
toOffsetsEnum.getTerm()
.Constructors in org.apache.lucene.search.uhighlight with parameters of type Query Constructor Description PhraseHelper(Query query, java.lang.String field, java.util.function.Predicate<java.lang.String> fieldMatcher, java.util.function.Function<SpanQuery,java.lang.Boolean> rewriteQueryPred, java.util.function.Function<Query,java.util.Collection<Query>> preExtractRewriteFunction, boolean ignoreQueriesNeedingRewrite)
Constructor.UHComponents(java.lang.String field, java.util.function.Predicate<java.lang.String> fieldMatcher, Query query, BytesRef[] terms, PhraseHelper phraseHelper, LabelledCharArrayMatcher[] automata, boolean hasUnrecognizedQueryPart, java.util.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 Query Modifier and Type Method Description (package private) java.util.Collection<Query>
FieldQuery. expand(java.util.Collection<Query> flatQueries)
Methods in org.apache.lucene.search.vectorhighlight with parameters of type Query Modifier and Type Method Description (package private) void
FieldQuery.QueryPhraseMap. add(Query query, IndexReader reader)
protected void
FieldQuery. flatten(Query sourceQuery, IndexReader reader, java.util.Collection<Query> flatQueries, float boost)
FieldQuery
FastVectorHighlighter. getFieldQuery(Query query)
create aFieldQuery
object.FieldQuery
FastVectorHighlighter. getFieldQuery(Query query, IndexReader reader)
create aFieldQuery
object.private java.lang.String
FieldQuery. getKey(Query query)
(package private) FieldQuery.QueryPhraseMap
FieldQuery. getRootMap(Query query)
private java.util.Set<java.lang.String>
FieldQuery. getTermSet(Query query)
Method parameters in org.apache.lucene.search.vectorhighlight with type arguments of type Query Modifier and Type Method Description private void
FieldQuery. checkOverlap(java.util.Collection<Query> expandQueries, Term[] src, Term[] dest, int slop, float boost)
private void
FieldQuery. checkOverlap(java.util.Collection<Query> expandQueries, PhraseQuery a, float aBoost, PhraseQuery b, float bBoost)
(package private) java.util.Collection<Query>
FieldQuery. expand(java.util.Collection<Query> flatQueries)
protected void
FieldQuery. flatten(Query sourceQuery, IndexReader reader, java.util.Collection<Query> flatQueries, float boost)
(package private) void
FieldQuery. saveTerms(java.util.Collection<Query> flatQueries, IndexReader reader)
Constructors in org.apache.lucene.search.vectorhighlight with parameters of type Query Constructor Description 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.util
Fields in org.apache.lucene.util declared as Query Modifier and Type Field Description (package private) Query
RamUsageEstimator.RamUsageQueryVisitor. root
Methods in org.apache.lucene.util that return Query Modifier and Type Method Description protected Query
QueryBuilder. analyzeBoolean(java.lang.String field, TokenStream stream)
Creates simple boolean query from the cached tokenstream contentsprotected Query
QueryBuilder. analyzeGraphBoolean(java.lang.String field, TokenStream source, BooleanClause.Occur operator)
Creates a boolean query from a graph token stream.protected Query
QueryBuilder. analyzeGraphPhrase(TokenStream source, java.lang.String field, int phraseSlop)
Creates graph phrase query from the tokenstream contentsprotected Query
QueryBuilder. analyzeMultiBoolean(java.lang.String field, TokenStream stream, BooleanClause.Occur operator)
Creates complex boolean query from the cached tokenstream contentsprotected Query
QueryBuilder. analyzeMultiPhrase(java.lang.String field, TokenStream stream, int slop)
Creates complex phrase query from the cached tokenstream contentsprotected Query
QueryBuilder. analyzePhrase(java.lang.String field, TokenStream stream, int slop)
Creates simple phrase query from the cached tokenstream contentsprotected Query
QueryBuilder. analyzeTerm(java.lang.String field, TokenStream stream)
Creates simple term query from the cached tokenstream contentsQuery
QueryBuilder. createBooleanQuery(java.lang.String field, java.lang.String queryText)
Creates a boolean query from the query text.Query
QueryBuilder. createBooleanQuery(java.lang.String field, java.lang.String queryText, BooleanClause.Occur operator)
Creates a boolean query from the query text.protected Query
QueryBuilder. createFieldQuery(Analyzer analyzer, BooleanClause.Occur operator, java.lang.String field, java.lang.String queryText, boolean quoted, int phraseSlop)
Creates a query from the analysis chain.protected Query
QueryBuilder. createFieldQuery(TokenStream source, BooleanClause.Occur operator, java.lang.String field, boolean quoted, int phraseSlop)
Creates a query from a token stream.Query
QueryBuilder. createMinShouldMatchQuery(java.lang.String field, java.lang.String queryText, float fraction)
Creates a minimum-should-match query from the query text.Query
QueryBuilder. createPhraseQuery(java.lang.String field, java.lang.String queryText)
Creates a phrase query from the query text.Query
QueryBuilder. createPhraseQuery(java.lang.String field, java.lang.String queryText, int phraseSlop)
Creates a phrase query from the query text.protected Query
QueryBuilder. newGraphSynonymQuery(java.util.Iterator<Query> queries)
Builds a new GraphQuery for multi-terms synonyms.protected Query
QueryBuilder. newSynonymQuery(QueryBuilder.TermAndBoost[] terms)
Builds a new SynonymQuery instance.protected Query
QueryBuilder. newTermQuery(Term term, float boost)
Builds a new TermQuery instance.Methods in org.apache.lucene.util with parameters of type Query Modifier and Type Method Description void
RamUsageEstimator.RamUsageQueryVisitor. consumeTerms(Query query, Term... terms)
QueryVisitor
RamUsageEstimator.RamUsageQueryVisitor. getSubVisitor(BooleanClause.Occur occur, Query parent)
static long
RamUsageEstimator. sizeOf(Query q)
Returns the size in bytes of a Query object.static long
RamUsageEstimator. sizeOf(Query q, long defSize)
Returns the size in bytes of a Query object.void
RamUsageEstimator.RamUsageQueryVisitor. visitLeaf(Query query)
Method parameters in org.apache.lucene.util with type arguments of type Query Modifier and Type Method Description protected Query
QueryBuilder. newGraphSynonymQuery(java.util.Iterator<Query> queries)
Builds a new GraphQuery for multi-terms synonyms.Constructors in org.apache.lucene.util with parameters of type Query Constructor Description RamUsageQueryVisitor(Query root, long defSize)
-
Uses of Query in org.apache.lucene.util.automaton
Methods in org.apache.lucene.util.automaton with parameters of type Query Modifier and Type Method Description void
CompiledAutomaton. visit(QueryVisitor visitor, Query parent, java.lang.String field)
Report back to a QueryVisitor how this automaton matches terms
-