Package | Description |
---|---|
org.apache.lucene.benchmark.byTask.feeds |
Sources for benchmark inputs: documents and queries.
|
org.apache.lucene.benchmark.byTask.tasks |
Extendable benchmark tasks.
|
org.apache.lucene.benchmark.quality |
Search Quality Benchmarking.
|
org.apache.lucene.benchmark.quality.utils |
Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
|
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.demo |
Demo applications for indexing and searching.
|
org.apache.lucene.demo.facet |
Facets example code.
|
org.apache.lucene.document |
The logical representation of a
Document for indexing and searching. |
org.apache.lucene.facet |
Faceted search.
|
org.apache.lucene.facet.range |
Provides range faceting capabilities.
|
org.apache.lucene.geo |
Geospatial Utility Implementations for Lucene Core
|
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.index.memory |
High-performance single-document main memory Apache Lucene fulltext search index.
|
org.apache.lucene.payloads |
Experimental classes for interacting with payloads
|
org.apache.lucene.queries |
Filters and Queries that add to core Lucene.
|
org.apache.lucene.queries.function |
Queries that compute score based upon a function.
|
org.apache.lucene.queries.function.valuesource |
A variety of functions to use with FunctionQuery.
|
org.apache.lucene.queries.mlt |
Document similarity query generators.
|
org.apache.lucene.queries.payloads |
The payloads package provides Query mechanisms for finding and using payloads.
|
org.apache.lucene.queryparser.analyzing |
QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
|
org.apache.lucene.queryparser.classic |
A simple query parser implemented with JavaCC.
|
org.apache.lucene.queryparser.complexPhrase |
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
|
org.apache.lucene.queryparser.ext |
Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
|
org.apache.lucene.queryparser.flexible.standard |
Implementation of the Lucene classic query parser using the flexible query parser frameworks
|
org.apache.lucene.queryparser.flexible.standard.builders |
Standard Lucene Query Node Builders.
|
org.apache.lucene.queryparser.simple |
A simple query parser for human-entered queries.
|
org.apache.lucene.queryparser.surround.query |
This package contains SrndQuery and its subclasses.
|
org.apache.lucene.queryparser.xml |
Parser that produces Lucene Query objects from XML streams.
|
org.apache.lucene.queryparser.xml.builders |
XML Parser factories for different Lucene Query/Filters.
|
org.apache.lucene.sandbox.queries |
Additional queries (some may have caveats or limitations)
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.grouping |
Grouping.
|
org.apache.lucene.search.highlight |
Highlighting search terms.
|
org.apache.lucene.search.join |
Support for index-time and query-time joins.
|
org.apache.lucene.search.postingshighlight |
Highlighter implementation that uses offsets from postings lists.
|
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 suggestion
|
org.apache.lucene.search.vectorhighlight |
Another highlighter implementation based on term vectors.
|
org.apache.lucene.spatial |
Lucene spatial search
|
org.apache.lucene.spatial.bbox |
Bounding Box Spatial Strategy
|
org.apache.lucene.spatial.composite |
Composite strategies.
|
org.apache.lucene.spatial.geopoint.search |
Geospatial Query Implementations for Core Lucene
|
org.apache.lucene.spatial.prefix |
Prefix Tree Strategy.
|
org.apache.lucene.spatial.serialized |
Strategies that serialize the shape (non-indexed).
|
org.apache.lucene.spatial3d |
Lucene field & query support for the spatial geometry implemented in
org.apache.lucene.spatial3d.geom . |
org.apache.lucene.util |
Some utility classes.
|
Modifier and Type | Field and Description |
---|---|
protected Query[] |
AbstractQueryMaker.queries |
Modifier and Type | Method and Description |
---|---|
Query |
QueryMaker.makeQuery()
Create the next query
|
Query |
AbstractQueryMaker.makeQuery() |
Query |
LongToEnglishQueryMaker.makeQuery() |
Query |
QueryMaker.makeQuery(int size)
Create the next query, of the given size.
|
Query |
AbstractQueryMaker.makeQuery(int size) |
Query |
LongToEnglishQueryMaker.makeQuery(int size) |
protected Query |
SpatialFileQueryMaker.makeQueryFromShape(com.spatial4j.core.shape.Shape shape) |
protected Query[] |
FileBasedQueryMaker.prepareQueries() |
protected Query[] |
EnwikiQueryMaker.prepareQueries() |
protected abstract Query[] |
AbstractQueryMaker.prepareQueries() |
protected Query[] |
SpatialFileQueryMaker.prepareQueries() |
protected Query[] |
SimpleQueryMaker.prepareQueries()
Prepare the queries for this test.
|
protected Query[] |
SimpleSloppyPhraseQueryMaker.prepareQueries() |
protected Query[] |
ReutersQueryMaker.prepareQueries() |
Modifier and Type | Method and Description |
---|---|
protected BenchmarkHighlighter |
SearchTravRetHighlightTask.getBenchmarkHighlighter(Query q) |
protected BenchmarkHighlighter |
SearchTravRetVectorHighlightTask.getBenchmarkHighlighter(Query q) |
protected BenchmarkHighlighter |
ReadTask.getBenchmarkHighlighter(Query q)
Return an appropriate highlighter to be used with
highlighting tasks
|
Modifier and Type | Method and Description |
---|---|
Query |
QualityQueryParser.parse(QualityQuery qq)
Parse a given QualityQuery into a Lucene query.
|
Modifier and Type | Method and Description |
---|---|
Query |
SimpleQQParser.parse(QualityQuery qq) |
Modifier and Type | Field and Description |
---|---|
protected Query |
SimpleNaiveBayesClassifier.query
Query used to eventually filter the document set to be used to classify |
protected Query |
KNearestNeighborClassifier.query
a
Query used to filter the documents that should be used from this classifier's underlying LeafReader |
Constructor and Description |
---|
BooleanPerceptronClassifier(LeafReader leafReader,
Analyzer analyzer,
Query query,
Integer batchSize,
Double threshold,
String classFieldName,
String textFieldName)
Creates a
BooleanPerceptronClassifier |
CachingNaiveBayesClassifier(LeafReader leafReader,
Analyzer analyzer,
Query query,
String classFieldName,
String... textFieldNames)
Creates a new NaiveBayes classifier with inside caching.
|
KNearestNeighborClassifier(LeafReader leafReader,
Similarity similarity,
Analyzer analyzer,
Query query,
int k,
int minDocsFreq,
int minTermFreq,
String classFieldName,
String... textFieldNames)
Creates a
KNearestNeighborClassifier . |
SimpleNaiveBayesClassifier(LeafReader leafReader,
Analyzer analyzer,
Query query,
String classFieldName,
String... textFieldNames)
Creates a new NaiveBayes classifier.
|
Constructor and Description |
---|
KNearestNeighborDocumentClassifier(LeafReader leafReader,
Similarity similarity,
Query query,
int k,
int minDocsFreq,
int minTermFreq,
String classFieldName,
Map<String,Analyzer> field2analyzer,
String... textFieldNames)
Creates a
KNearestNeighborClassifier . |
SimpleNaiveBayesDocumentClassifier(LeafReader leafReader,
Query query,
String classFieldName,
Map<String,Analyzer> field2analyzer,
String... textFieldNames)
Creates a new NaiveBayes classifier.
|
Modifier and Type | Method and Description |
---|---|
static void |
SearchFiles.doPagingSearch(BufferedReader in,
IndexSearcher searcher,
Query query,
int hitsPerPage,
boolean raw,
boolean interactive)
This demonstrates a typical paging search scenario, where the search engine presents
pages of size n to the user.
|
Modifier and Type | Method and Description |
---|---|
static Query |
DistanceFacetsExample.getBoundingBoxQuery(double originLat,
double originLng,
double maxDistanceKM)
Given a latitude and longitude (in degrees) and the
maximum great circle (surface of the earth) distance,
returns a simple Filter bounding box to "fast match"
candidates.
|
Modifier and Type | Method and Description |
---|---|
static Query |
LatLonPoint.newBoxQuery(String field,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
Create a query for matching a bounding box.
|
static Query |
LatLonPoint.newDistanceQuery(String field,
double latitude,
double longitude,
double radiusMeters)
Create a query for matching points within the specified distance of the supplied location.
|
static Query |
BigIntegerPoint.newExactQuery(String field,
BigInteger value)
Create a query for matching an exact big integer value.
|
static Query |
BinaryPoint.newExactQuery(String field,
byte[] value)
Create a query for matching an exact binary value.
|
static Query |
DoublePoint.newExactQuery(String field,
double value)
Create a query for matching an exact double value.
|
static Query |
HalfFloatPoint.newExactQuery(String field,
float value)
Create a query for matching an exact half-float value.
|
static Query |
FloatPoint.newExactQuery(String field,
float value)
Create a query for matching an exact float value.
|
static Query |
InetAddressPoint.newExactQuery(String field,
InetAddress value)
Create a query for matching a network address.
|
static Query |
IntPoint.newExactQuery(String field,
int value)
Create a query for matching an exact integer value.
|
static Query |
LongPoint.newExactQuery(String field,
long value)
Create a query for matching an exact long value.
|
static Query |
LatLonPoint.newPolygonQuery(String field,
Polygon... polygons)
Create a query for matching one or more polygons.
|
static Query |
InetAddressPoint.newPrefixQuery(String field,
InetAddress value,
int prefixLength)
Create a prefix query for matching a CIDR network range.
|
static Query |
BigIntegerPoint.newRangeQuery(String field,
BigInteger[] lowerValue,
BigInteger[] upperValue)
Create a range query for n-dimensional big integer values.
|
static Query |
BigIntegerPoint.newRangeQuery(String field,
BigInteger lowerValue,
BigInteger upperValue)
Create a range query for big integer values.
|
static Query |
BinaryPoint.newRangeQuery(String field,
byte[][] lowerValue,
byte[][] upperValue)
Create a range query for n-dimensional binary values.
|
static Query |
BinaryPoint.newRangeQuery(String field,
byte[] lowerValue,
byte[] upperValue)
Create a range query for binary values.
|
static Query |
DoublePoint.newRangeQuery(String field,
double[] lowerValue,
double[] upperValue)
Create a range query for n-dimensional double values.
|
static Query |
DoublePoint.newRangeQuery(String field,
double lowerValue,
double upperValue)
Create a range query for double values.
|
static Query |
HalfFloatPoint.newRangeQuery(String field,
float[] lowerValue,
float[] upperValue)
Create a range query for n-dimensional half-float values.
|
static Query |
FloatPoint.newRangeQuery(String field,
float[] lowerValue,
float[] upperValue)
Create a range query for n-dimensional float values.
|
static Query |
HalfFloatPoint.newRangeQuery(String field,
float lowerValue,
float upperValue)
Create a range query for half-float values.
|
static Query |
FloatPoint.newRangeQuery(String field,
float lowerValue,
float upperValue)
Create a range query for float values.
|
static Query |
InetAddressPoint.newRangeQuery(String field,
InetAddress lowerValue,
InetAddress upperValue)
Create a range query for network addresses.
|
static Query |
IntPoint.newRangeQuery(String field,
int[] lowerValue,
int[] upperValue)
Create a range query for n-dimensional integer values.
|
static Query |
IntPoint.newRangeQuery(String field,
int lowerValue,
int upperValue)
Create a range query for integer values.
|
static Query |
LongPoint.newRangeQuery(String field,
long[] lowerValue,
long[] upperValue)
Create a range query for n-dimensional long values.
|
static Query |
LongPoint.newRangeQuery(String field,
long lowerValue,
long upperValue)
Create a range query for long values.
|
static Query |
BigIntegerPoint.newSetQuery(String field,
BigInteger... values)
Create a query matching any of the specified 1D values.
|
static Query |
BinaryPoint.newSetQuery(String field,
byte[]... values)
Create a query matching any of the specified 1D values.
|
static Query |
DoublePoint.newSetQuery(String field,
Collection<Double> values)
Create a query matching any of the specified 1D values.
|
static Query |
HalfFloatPoint.newSetQuery(String field,
Collection<Float> values)
Create a query matching any of the specified 1D values.
|
static Query |
FloatPoint.newSetQuery(String field,
Collection<Float> values)
Create a query matching any of the specified 1D values.
|
static Query |
IntPoint.newSetQuery(String field,
Collection<Integer> values)
Create a query matching any of the specified 1D values.
|
static Query |
LongPoint.newSetQuery(String field,
Collection<Long> values)
Create a query matching any of the specified 1D values.
|
static Query |
DoublePoint.newSetQuery(String field,
double... values)
Create a query matching any of the specified 1D values.
|
static Query |
HalfFloatPoint.newSetQuery(String field,
float... values)
Create a query matching any of the specified 1D values.
|
static Query |
FloatPoint.newSetQuery(String field,
float... values)
Create a query matching any of the specified 1D values.
|
static Query |
InetAddressPoint.newSetQuery(String field,
InetAddress... values)
Create a query matching any of the specified 1D values.
|
static Query |
IntPoint.newSetQuery(String field,
int... values)
Create a query matching any of the specified 1D values.
|
static Query |
LongPoint.newSetQuery(String field,
long... values)
Create a query matching any of the specified 1D values.
|
Modifier and Type | Class and Description |
---|---|
class |
DrillDownQuery
A
Query for drill-down over facet categories. |
Modifier and Type | Method and Description |
---|---|
Query |
DrillDownQuery.rewrite(IndexReader r) |
Modifier and Type | Method and Description |
---|---|
void |
DrillDownQuery.add(String dim,
Query subQuery)
Expert: add a custom drill-down subQuery.
|
DrillSideways.DrillSidewaysResult |
DrillSideways.search(DrillDownQuery query,
Query filter,
FieldDoc after,
int topN,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Search, sorting by
Sort , and computing
drill down and sideways counts. |
static TopDocs |
FacetsCollector.search(IndexSearcher searcher,
Query q,
int n,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopFieldDocs |
FacetsCollector.search(IndexSearcher searcher,
Query q,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopFieldDocs |
FacetsCollector.search(IndexSearcher searcher,
Query q,
int n,
Sort sort,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopDocs |
FacetsCollector.searchAfter(IndexSearcher searcher,
ScoreDoc after,
Query q,
int n,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopDocs |
FacetsCollector.searchAfter(IndexSearcher searcher,
ScoreDoc after,
Query q,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
static TopDocs |
FacetsCollector.searchAfter(IndexSearcher searcher,
ScoreDoc after,
Query q,
int n,
Sort sort,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
Constructor and Description |
---|
DrillDownQuery(FacetsConfig config,
Query baseQuery)
Creates a new
DrillDownQuery over the given base query. |
Modifier and Type | Method and Description |
---|---|
Query |
LongRange.getQuery(Query fastMatchQuery,
ValueSource valueSource) |
abstract Query |
Range.getQuery(Query fastMatchQuery,
ValueSource valueSource)
Returns a new
Query accepting only documents
in this range. |
Query |
DoubleRange.getQuery(Query fastMatchQuery,
ValueSource valueSource) |
Query |
Range.getQuery(ValueSource valueSource)
Returns a new
Query accepting only documents
in this range. |
Modifier and Type | Method and Description |
---|---|
Query |
LongRange.getQuery(Query fastMatchQuery,
ValueSource valueSource) |
abstract Query |
Range.getQuery(Query fastMatchQuery,
ValueSource valueSource)
Returns a new
Query accepting only documents
in this range. |
Query |
DoubleRange.getQuery(Query fastMatchQuery,
ValueSource valueSource) |
Constructor and Description |
---|
DoubleRangeFacetCounts(String field,
ValueSource valueSource,
FacetsCollector hits,
Query fastMatchQuery,
DoubleRange... ranges)
Create
RangeFacetCounts , using the provided
ValueSource , and using the provided Query as
a fastmatch: only documents passing the filter are
checked for the matching ranges. |
LongRangeFacetCounts(String field,
ValueSource valueSource,
FacetsCollector hits,
Query fastMatchQuery,
LongRange... ranges)
Create
RangeFacetCounts , using the provided
ValueSource , and using the provided Filter as
a fastmatch: only documents passing the filter are
checked for the matching ranges. |
Modifier and Type | Method and Description |
---|---|
protected abstract Query |
BaseGeoPointTestCase.newDistanceQuery(String field,
double centerLat,
double centerLon,
double radiusMeters) |
protected abstract Query |
BaseGeoPointTestCase.newPolygonQuery(String field,
Polygon... polygon) |
protected abstract Query |
BaseGeoPointTestCase.newRectQuery(String field,
double minLat,
double maxLat,
double minLon,
double maxLon) |
Modifier and Type | Method and Description |
---|---|
void |
IndexWriter.deleteDocuments(Query... queries)
Deletes the document(s) matching any of the provided queries.
|
long |
TrackingIndexWriter.deleteDocuments(Query... queries)
Calls
IndexWriter.deleteDocuments(Query...)
and returns the generation that reflects this change. |
void |
RandomIndexWriter.deleteDocuments(Query q) |
long |
TrackingIndexWriter.deleteDocuments(Query q)
Calls
IndexWriter.deleteDocuments(Query...) and
returns the generation that reflects this change. |
Constructor and Description |
---|
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Query docsInFirstIndex)
Split an index based on a
Query . |
PKIndexSplitter(Directory input,
Directory dir1,
Directory dir2,
Query docsInFirstIndex,
IndexWriterConfig config1,
IndexWriterConfig config2) |
Modifier and Type | Method and Description |
---|---|
float |
MemoryIndex.search(Query query)
Convenience method that efficiently returns the relevance score by
matching this index against the given Lucene query expression.
|
Modifier and Type | Method and Description |
---|---|
Collection<byte[]> |
PayloadSpanUtil.getPayloadsForQuery(Query query)
Query should be rewritten for wild/fuzzy support.
|
Modifier and Type | Class and Description |
---|---|
class |
BoostingQuery
The BoostingQuery class can be used to effectively demote results that match a given query.
|
class |
CommonTermsQuery
A query that executes high-frequency terms in a optional sub-query to prevent
slow queries due to "common" terms like stopwords.
|
class |
CustomScoreQuery
Query that sets document score as a programmatic function of several (sub) scores:
the score of its subQuery (any query)
(optional) the score of its
FunctionQuery (or queries).
Subclasses can modify the computation by overriding CustomScoreQuery.getCustomScoreProvider(org.apache.lucene.index.LeafReaderContext) . |
class |
TermsQuery
Specialization for a disjunction over many terms that behaves like a
ConstantScoreQuery over a BooleanQuery containing only
BooleanClause.Occur.SHOULD clauses. |
Modifier and Type | Method and Description |
---|---|
protected Query |
CommonTermsQuery.buildQuery(int maxDoc,
TermContext[] contextArray,
Term[] queryTerms) |
Query |
BoostingQuery.getContext() |
Query |
BoostingQuery.getMatch() |
Query[] |
CustomScoreQuery.getScoringQueries()
The scoring queries that only affect the score of CustomScoreQuery.
|
Query |
CustomScoreQuery.getSubQuery()
The sub-query that CustomScoreQuery wraps, affecting both the score and which documents match.
|
protected Query |
CommonTermsQuery.newTermQuery(Term term,
TermContext context)
Builds a new TermQuery instance.
|
Query |
CustomScoreQuery.rewrite(IndexReader reader) |
Query |
TermsQuery.rewrite(IndexReader reader) |
Query |
CommonTermsQuery.rewrite(IndexReader reader) |
Query |
BoostingQuery.rewrite(IndexReader reader) |
Constructor and Description |
---|
BoostingQuery(Query match,
Query context,
float boost) |
CustomScoreQuery(Query subQuery)
Create a CustomScoreQuery over input subQuery.
|
CustomScoreQuery(Query subQuery,
FunctionQuery... scoringQueries)
Create a CustomScoreQuery over input subQuery and a
FunctionQuery . |
CustomScoreQuery(Query subQuery,
FunctionQuery scoringQuery)
Create a CustomScoreQuery over input subQuery and a
FunctionQuery . |
Modifier and Type | Class and Description |
---|---|
class |
BoostedQuery
Query that is boosted by a ValueSource
|
class |
FunctionQuery
Returns a score for each document based on a ValueSource,
often some function of the value of a field.
|
class |
FunctionRangeQuery
A Query wrapping a
ValueSource that matches docs in which the values in the value source match a configured
range. |
Modifier and Type | Method and Description |
---|---|
Query |
BoostedQuery.getQuery() |
Query |
BoostedQuery.rewrite(IndexReader reader) |
Constructor and Description |
---|
BoostedQuery(Query subQuery,
ValueSource boostVal) |
Modifier and Type | Method and Description |
---|---|
Query |
QueryValueSource.getQuery() |
Constructor and Description |
---|
QueryValueSource(Query q,
float defVal) |
Modifier and Type | Class and Description |
---|---|
class |
MoreLikeThisQuery
A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg
in custom QueryParser extensions.
|
Modifier and Type | Method and Description |
---|---|
Query |
MoreLikeThis.like(int docNum)
Return a query that will return docs like the passed lucene document ID.
|
Query |
MoreLikeThis.like(Map<String,Collection<Object>> filteredDocument) |
Query |
MoreLikeThis.like(String fieldName,
Reader... readers)
Return a query that will return docs like the passed Readers.
|
Query |
MoreLikeThisQuery.rewrite(IndexReader reader) |
Modifier and Type | Class and Description |
---|---|
class |
PayloadScoreQuery
A Query class that uses a
PayloadFunction to modify the score of a
wrapped SpanQuery
NOTE: In order to take advantage of this with the default scoring implementation
(ClassicSimilarity ), you must override ClassicSimilarity.scorePayload(int, int, int, BytesRef) ,
which returns 1 by default. |
class |
SpanPayloadCheckQuery
Only return those matches that have a specific payload at the given position.
|
Modifier and Type | Method and Description |
---|---|
protected Query |
AnalyzingQueryParser.getFuzzyQuery(String field,
String termStr,
float minSimilarity)
Called when parser parses an input term that has the fuzzy suffix (~) appended.
|
protected Query |
AnalyzingQueryParser.getPrefixQuery(String field,
String termStr)
Called when parser parses an input term
that uses prefix notation; that is, contains a single '*' wildcard
character as its last character.
|
protected Query |
AnalyzingQueryParser.getWildcardQuery(String field,
String termStr)
Called when parser parses an input term that contains one or more wildcard
characters (like
* ), but is not a prefix term (one that has
just a single * character at the end). |
Modifier and Type | Method and Description |
---|---|
Query |
QueryParser.Clause(String field) |
protected Query |
QueryParserBase.getBooleanQuery(List<BooleanClause> clauses)
Factory method for generating query, given a set of clauses.
|
protected Query |
QueryParserBase.getFieldQuery(String field,
String queryText,
boolean quoted) |
protected Query |
MultiFieldQueryParser.getFieldQuery(String field,
String queryText,
boolean quoted) |
protected Query |
QueryParserBase.getFieldQuery(String field,
String queryText,
int slop)
Base implementation delegates to
QueryParserBase.getFieldQuery(String,String,boolean) . |
protected Query |
MultiFieldQueryParser.getFieldQuery(String field,
String queryText,
int slop) |
protected Query |
QueryParserBase.getFuzzyQuery(String field,
String termStr,
float minSimilarity)
Factory method for generating a query (similar to
QueryParserBase.getWildcardQuery(java.lang.String, java.lang.String) ). |
protected Query |
MultiFieldQueryParser.getFuzzyQuery(String field,
String termStr,
float minSimilarity) |
protected Query |
MultiFieldQueryParser.getMultiFieldQuery(List<Query> queries)
Creates a multifield query
|
protected Query |
QueryParserBase.getPrefixQuery(String field,
String termStr)
Factory method for generating a query (similar to
QueryParserBase.getWildcardQuery(java.lang.String, java.lang.String) ). |
protected Query |
MultiFieldQueryParser.getPrefixQuery(String field,
String termStr) |
protected Query |
QueryParserBase.getRangeQuery(String field,
String part1,
String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
MultiFieldQueryParser.getRangeQuery(String field,
String part1,
String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
QueryParserBase.getRegexpQuery(String field,
String termStr)
Factory method for generating a query.
|
protected Query |
MultiFieldQueryParser.getRegexpQuery(String field,
String termStr) |
protected Query |
QueryParserBase.getWildcardQuery(String field,
String termStr)
Factory method for generating a query.
|
protected Query |
MultiFieldQueryParser.getWildcardQuery(String field,
String termStr) |
protected Query |
QueryParserBase.newFieldQuery(Analyzer analyzer,
String field,
String queryText,
boolean quoted) |
protected Query |
QueryParserBase.newFuzzyQuery(Term term,
float minimumSimilarity,
int prefixLength)
Builds a new FuzzyQuery instance
|
protected Query |
QueryParserBase.newMatchAllDocsQuery()
Builds a new MatchAllDocsQuery instance
|
protected Query |
QueryParserBase.newPrefixQuery(Term prefix)
Builds a new PrefixQuery instance
|
protected Query |
QueryParserBase.newRangeQuery(String field,
String part1,
String part2,
boolean startInclusive,
boolean endInclusive)
Builds a new
TermRangeQuery instance |
protected Query |
QueryParserBase.newRegexpQuery(Term regexp)
Builds a new RegexpQuery instance
|
protected Query |
QueryParserBase.newWildcardQuery(Term t)
Builds a new WildcardQuery instance
|
Query |
QueryParserBase.parse(String query)
Parses a query string, returning a
Query . |
static Query |
MultiFieldQueryParser.parse(String[] queries,
String[] fields,
Analyzer analyzer)
Parses a query which searches on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(String[] queries,
String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(String query,
String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
Query |
QueryParser.Query(String field) |
Query |
QueryParser.Term(String field) |
abstract Query |
QueryParserBase.TopLevelQuery(String field) |
Query |
QueryParser.TopLevelQuery(String field) |
Modifier and Type | Method and Description |
---|---|
protected void |
QueryParserBase.addClause(List<BooleanClause> clauses,
int conj,
int mods,
Query q) |
protected BooleanClause |
QueryParserBase.newBooleanClause(Query q,
BooleanClause.Occur occur)
Builds a new BooleanClause instance
|
Modifier and Type | Method and Description |
---|---|
protected Query |
MultiFieldQueryParser.getMultiFieldQuery(List<Query> queries)
Creates a multifield query
|
Modifier and Type | Method and Description |
---|---|
protected Query |
ComplexPhraseQueryParser.getFieldQuery(String field,
String queryText,
int slop) |
protected Query |
ComplexPhraseQueryParser.getFuzzyQuery(String field,
String termStr,
float minSimilarity) |
protected Query |
ComplexPhraseQueryParser.getRangeQuery(String field,
String part1,
String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
ComplexPhraseQueryParser.getWildcardQuery(String field,
String termStr) |
protected Query |
ComplexPhraseQueryParser.newRangeQuery(String field,
String part1,
String part2,
boolean startInclusive,
boolean endInclusive) |
protected Query |
ComplexPhraseQueryParser.newTermQuery(Term term) |
Query |
ComplexPhraseQueryParser.parse(String query) |
Modifier and Type | Method and Description |
---|---|
protected Query |
ExtendableQueryParser.getFieldQuery(String field,
String queryText,
boolean quoted) |
abstract Query |
ParserExtension.parse(ExtensionQuery query)
Processes the given
ExtensionQuery and returns a corresponding
Query instance. |
Modifier and Type | Method and Description |
---|---|
static Query |
QueryParserUtil.parse(String[] queries,
String[] fields,
Analyzer analyzer)
Parses a query which searches on the fields specified.
|
static Query |
QueryParserUtil.parse(String[] queries,
String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
Query |
StandardQueryParser.parse(String query,
String defaultField)
Overrides
QueryParserHelper.parse(String, String) so it casts the
return object to Query . |
static Query |
QueryParserUtil.parse(String query,
String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
Modifier and Type | Method and Description |
---|---|
Query |
ModifierQueryNodeBuilder.build(QueryNode queryNode) |
Query |
BoostQueryNodeBuilder.build(QueryNode queryNode) |
Query |
StandardQueryBuilder.build(QueryNode queryNode) |
Query |
PhraseQueryNodeBuilder.build(QueryNode queryNode) |
Query |
SlopQueryNodeBuilder.build(QueryNode queryNode) |
Query |
GroupQueryNodeBuilder.build(QueryNode queryNode) |
Query |
StandardQueryTreeBuilder.build(QueryNode queryNode) |
Query |
PointRangeQueryNodeBuilder.build(QueryNode queryNode) |
Modifier and Type | Method and Description |
---|---|
protected Query |
SimpleQueryParser.newDefaultQuery(String text)
Factory method to generate a standard query (no phrase or prefix operators).
|
protected Query |
SimpleQueryParser.newFuzzyQuery(String text,
int fuzziness)
Factory method to generate a fuzzy query.
|
protected Query |
SimpleQueryParser.newPhraseQuery(String text,
int slop)
Factory method to generate a phrase query with slop.
|
protected Query |
SimpleQueryParser.newPrefixQuery(String text)
Factory method to generate a prefix query.
|
Query |
SimpleQueryParser.parse(String queryText)
Parses the query text and returns parsed query
|
protected Query |
SimpleQueryParser.simplify(BooleanQuery bq)
Helper to simplify boolean queries with 0 or 1 clause
|
Modifier and Type | Method and Description |
---|---|
Query |
DistanceQuery.getSpanNearQuery(IndexReader reader,
String fieldName,
BasicQueryFactory qf) |
Query |
SrndQuery.makeLuceneQueryField(String fieldName,
BasicQueryFactory qf) |
Query |
SimpleTerm.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
NotQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
FieldsQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
AndQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
DistanceQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
OrQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
abstract Query |
SrndQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
FieldsQuery.makeLuceneQueryNoBoost(BasicQueryFactory qf) |
Modifier and Type | Method and Description |
---|---|
List<Query> |
ComposedQuery.makeLuceneSubQueriesField(String fn,
BasicQueryFactory qf) |
Modifier and Type | Method and Description |
---|---|
void |
SpanNearClauseFactory.addSpanQuery(Query q) |
Modifier and Type | Method and Description |
---|---|
Query |
QueryBuilderFactory.getQuery(Element n) |
Query |
CoreParser.getQuery(Element e) |
Query |
QueryBuilder.getQuery(Element e) |
Query |
CoreParser.parse(InputStream xmlStream) |
Modifier and Type | Method and Description |
---|---|
Query |
LegacyNumericRangeQueryBuilder.getQuery(Element e)
Deprecated.
|
Query |
UserInputQueryBuilder.getQuery(Element e) |
Query |
RangeQueryBuilder.getQuery(Element e) |
Query |
MatchAllDocsQueryBuilder.getQuery(Element e) |
Query |
TermQueryBuilder.getQuery(Element e) |
Query |
ConstantScoreQueryBuilder.getQuery(Element e) |
Query |
TermsQueryBuilder.getQuery(Element e) |
Query |
PointRangeQueryBuilder.getQuery(Element e) |
Query |
SpanBuilderBase.getQuery(Element e) |
Query |
SpanQueryBuilderFactory.getQuery(Element e) |
Query |
DisjunctionMaxQueryBuilder.getQuery(Element e) |
Query |
LikeThisQueryBuilder.getQuery(Element e) |
Query |
BoostingQueryBuilder.getQuery(Element e) |
Query |
FuzzyLikeThisQueryBuilder.getQuery(Element e) |
Query |
BooleanQueryBuilder.getQuery(Element e) |
Modifier and Type | Class and Description |
---|---|
class |
FuzzyLikeThisQuery
Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms.
|
class |
SlowFuzzyQuery
Deprecated.
Use
FuzzyQuery instead. |
Modifier and Type | Method and Description |
---|---|
Query |
FuzzyLikeThisQuery.rewrite(IndexReader reader) |
Modifier and Type | Class and Description |
---|---|
class |
AssertingQuery
Assertion-enabled query.
|
class |
AutomatonQuery
A
Query that will match terms against a finite-state machine. |
class |
BlendedTermQuery
A
Query that blends index statistics across multiple terms. |
class |
BooleanQuery
A Query that matches documents matching boolean combinations of other
queries, e.g.
|
class |
BoostQuery
A
Query wrapper that allows to give a boost to the wrapped query. |
class |
ConstantScoreQuery
A query that wraps another query and simply returns a constant score equal to
1 for every document that matches the query.
|
class |
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 |
DocValuesNumbersQuery
Like
DocValuesTermsQuery , but this query only
runs on a long NumericDocValuesField or a
SortedNumericDocValuesField , matching
all documents whose value in the specified field is
contained in the provided set of long values. |
class |
DocValuesRangeQuery
A range query that works on top of the doc values APIs.
|
class |
DocValuesTermsQuery
A
Query that only accepts documents whose
term value in the specified field is contained in the
provided set of allowed terms. |
class |
FieldValueQuery
A
Query that matches documents that have a value for a given field
as reported by LeafReader.getDocsWithField(String) . |
class |
FuzzyQuery
Implements the fuzzy search query.
|
class |
LegacyNumericRangeQuery<T extends Number>
Deprecated.
Instead index with
IntPoint , LongPoint , FloatPoint , DoublePoint , and
create range queries with IntPoint.newRangeQuery() ,
LongPoint.newRangeQuery() ,
FloatPoint.newRangeQuery() ,
DoublePoint.newRangeQuery() respectively.
See PointValues for background information on Points. |
class |
MatchAllDocsQuery
A query that matches all documents.
|
class |
MatchNoDocsQuery
A query that matches no documents.
|
class |
MultiPhraseQuery
A generalized version of
PhraseQuery , with the possibility of
adding more than one term at the same position that are treated as a disjunction (OR). |
class |
MultiTermQuery
An abstract
Query that matches documents
containing a subset of terms provided by a FilteredTermsEnum enumeration. |
class |
NGramPhraseQuery
This is a
PhraseQuery which is optimized for n-gram phrase query. |
class |
PhraseQuery
A Query that matches documents containing a particular sequence of terms.
|
class |
PointInSetQuery
Abstract query class to find all documents whose single or multi-dimensional point values, previously indexed with e.g.
|
class |
PointRangeQuery
Abstract class for range queries against single or multidimensional points such as
IntPoint . |
class |
PrefixQuery
A Query that matches documents containing terms with a specified prefix.
|
class |
RandomApproximationQuery
A
Query that adds random approximations to its scorers. |
class |
RegexpQuery
A fast regular expression query based on the
org.apache.lucene.util.automaton package. |
class |
SynonymQuery
A query that treats multiple terms as synonyms.
|
class |
TermAutomatonQuery
A proximity query that lets you express an automaton, whose
transitions are terms, to match documents.
|
class |
TermQuery
A Query that matches documents containing a term.
|
class |
TermRangeQuery
A Query that matches documents within an range of terms.
|
class |
WildcardQuery
Implements the wildcard search query.
|
Modifier and Type | Field and Description |
---|---|
protected Query |
Weight.parentQuery |
Modifier and Type | Method and Description |
---|---|
protected Query |
MultiTermQuery.TopTermsBlendedFreqScoringRewrite.build(BlendedTermQuery.Builder builder) |
protected Query |
MultiTermQuery.TopTermsScoringBooleanQueryRewrite.build(BooleanQuery.Builder builder) |
protected Query |
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.build(BooleanQuery.Builder builder) |
protected Query |
SearchEquivalenceTestBase.filteredQuery(Query query,
Query filter) |
Query |
AssertingQuery.getIn() |
Query |
BooleanClause.getQuery() |
Query |
Weight.getQuery()
The query that this concerns.
|
Query |
BoostQuery.getQuery()
Return the wrapped
Query . |
Query |
ConstantScoreQuery.getQuery()
Returns the encapsulated query.
|
protected Query |
BaseExplanationTestCase.matchTheseItems(int[] terms)
Convenience subclass of TermsQuery
|
static Query |
DocValuesRangeQuery.newBytesRefRange(String field,
BytesRef lowerVal,
BytesRef upperVal,
boolean includeLower,
boolean includeUpper)
Create a new numeric range query on a numeric doc-values field.
|
static Query |
DocValuesRangeQuery.newLongRange(String field,
Long lowerVal,
Long upperVal,
boolean includeLower,
boolean includeUpper)
Create a new numeric range query on a numeric doc-values field.
|
Query |
BaseExplanationTestCase.optB(Query q)
MACRO: Wraps a Query in a BooleanQuery so that it is optional, along
with a second prohibited clause which will never match anything
|
protected Query |
SearchEquivalenceTestBase.randomFilter()
Returns a random filter over the document set
|
Query |
BaseExplanationTestCase.reqB(Query q)
MACRO: Wraps a Query in a BooleanQuery so that it is required, along
with a second optional clause which will match everything
|
Query |
DocValuesRangeQuery.rewrite(IndexReader reader) |
Query |
RandomApproximationQuery.rewrite(IndexReader reader) |
Query |
AssertingQuery.rewrite(IndexReader reader) |
Query |
MultiPhraseQuery.rewrite(IndexReader reader) |
Query |
DisjunctionMaxQuery.rewrite(IndexReader reader)
Optimize our representation and our subqueries representations
|
Query |
BlendedTermQuery.rewrite(IndexReader reader) |
Query |
SynonymQuery.rewrite(IndexReader reader) |
Query |
MultiTermQuery.rewrite(IndexReader reader)
To rewrite to a simpler form, instead return a simpler
enum from
MultiTermQuery.getTermsEnum(Terms, AttributeSource) . |
Query |
BooleanQuery.rewrite(IndexReader reader) |
Query |
BoostQuery.rewrite(IndexReader reader) |
Query |
ConstantScoreQuery.rewrite(IndexReader reader) |
Query |
MatchNoDocsQuery.rewrite(IndexReader reader) |
Query |
NGramPhraseQuery.rewrite(IndexReader reader) |
Query |
Query.rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
Query |
PhraseQuery.rewrite(IndexReader reader) |
Query |
ScoringRewrite.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
DocValuesRewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
TopTermsRewrite.rewrite(IndexReader reader,
MultiTermQuery query) |
abstract Query |
MultiTermQuery.RewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.rewrite(Query original) |
Query |
AssertingIndexSearcher.rewrite(Query original) |
Query |
IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
|
abstract Query |
BlendedTermQuery.RewriteMethod.rewrite(Query[] subQueries)
Merge the provided sub queries into a single
Query object. |
Query |
BlendedTermQuery.DisjunctionMaxRewrite.rewrite(Query[] subQueries) |
static Query |
AssertingQuery.wrap(Random random,
Query query)
Wrap a query if necessary.
|
Modifier and Type | Method and Description |
---|---|
List<Query> |
DisjunctionMaxQuery.getDisjuncts() |
Iterator<Query> |
DisjunctionMaxQuery.iterator() |
Modifier and Type | Method and Description |
---|---|
BooleanQuery.Builder |
BooleanQuery.Builder.add(Query query,
BooleanClause.Occur occur)
Add a new clause to this
BooleanQuery.Builder . |
protected void |
SearchEquivalenceTestBase.assertSameScores(Query q1,
Query q2)
Assert that two queries return the same documents and with the same scores.
|
protected void |
SearchEquivalenceTestBase.assertSameScores(Query q1,
Query q2,
Query filter) |
void |
SearchEquivalenceTestBase.assertSameSet(Query q1,
Query q2)
Asserts that the documents returned by
q1
are the same as of those returned by q2 |
void |
SearchEquivalenceTestBase.assertSubsetOf(Query q1,
Query q2)
Asserts that the documents returned by
q1
are a subset of those returned by q2 |
protected void |
SearchEquivalenceTestBase.assertSubsetOf(Query q1,
Query q2,
Query filter)
Asserts that the documents returned by
q1
are a subset of those returned by q2 . |
void |
BaseExplanationTestCase.bqtest(Query q,
int[] expDocNrs)
Tests a query using qtest after wrapping it with both optB and reqB
|
static void |
QueryUtils.check(Query q)
Check the types of things query objects should be able to do.
|
static void |
QueryUtils.check(Random random,
Query q1,
IndexSearcher s)
Various query sanity checks on a searcher, some checks are only done for
instanceof IndexSearcher.
|
static void |
QueryUtils.check(Random random,
Query q1,
IndexSearcher s,
boolean wrap) |
static void |
QueryUtils.checkBulkScorerSkipTo(Random r,
Query query,
IndexSearcher searcher)
Check that the scorer and bulk scorer advance consistently.
|
static void |
QueryUtils.checkEqual(Query q1,
Query q2) |
static void |
CheckHits.checkEqual(Query query,
ScoreDoc[] hits1,
ScoreDoc[] hits2) |
protected void |
CheckHits.ExplanationAssertingSearcher.checkExplanations(Query q) |
static void |
QueryUtils.checkExplanations(Query q,
IndexSearcher s)
deep check that explanations of a query 'score' correctly
|
static void |
CheckHits.checkExplanations(Query query,
String defaultFieldName,
IndexSearcher searcher)
Asserts that the explanation value for every document matching a
query corresponds with the true score.
|
static void |
CheckHits.checkExplanations(Query query,
String defaultFieldName,
IndexSearcher searcher,
boolean deep)
Asserts that the explanation value for every document matching a
query corresponds with the true score.
|
static void |
QueryUtils.checkFirstSkipTo(Query q,
IndexSearcher s)
check that first skip on just created scorers always goes to the right doc
|
static void |
QueryUtils.checkHashEquals(Query q)
check very basic hashCode and equals
|
static void |
CheckHits.checkHitCollector(Random random,
Query query,
String defaultFieldName,
IndexSearcher searcher,
int[] results)
Tests that a query matches the an expected set of documents using a
HitCollector.
|
static void |
CheckHits.checkHits(Random random,
Query query,
String defaultFieldName,
IndexSearcher searcher,
int[] results)
Tests that a query matches the an expected set of documents using Hits.
|
static void |
CheckHits.checkHitsQuery(Query query,
ScoreDoc[] hits1,
ScoreDoc[] hits2,
int[] results)
Tests that two queries have an expected order of documents,
and that the two queries have the same score values.
|
static void |
CheckHits.checkNoMatchExplanations(Query q,
String defaultFieldName,
IndexSearcher searcher,
int[] results)
Tests that all documents up to maxDoc which are *not* in the
expected result set, have an explanation which indicates that
the document does not match
|
static void |
QueryUtils.checkSkipTo(Query q,
IndexSearcher s)
alternate scorer advance(),advance(),next(),next(),advance(),advance(), etc
and ensure a hitcollector receives same docs and scores
|
static void |
QueryUtils.checkUnequal(Query q1,
Query q2) |
void |
LRUQueryCache.clearQuery(Query query)
Remove all cache entries for the given query.
|
int |
IndexSearcher.count(Query query)
Count how many documents match the given query.
|
Weight |
AssertingIndexSearcher.createNormalizedWeight(Query query,
boolean needsScores)
Ensures, that the returned
Weight is not normalized again, which may produce wrong scores. |
Weight |
IndexSearcher.createNormalizedWeight(Query query,
boolean needsScores)
Creates a normalized weight for a top-level
Query . |
Weight |
AssertingIndexSearcher.createWeight(Query query,
boolean needsScores) |
Weight |
IndexSearcher.createWeight(Query query,
boolean needsScores)
Creates a
Weight for the given query, potentially adding caching
if possible and configured. |
Explanation |
IndexSearcher.explain(Query query,
int doc)
Returns an Explanation that describes how
doc scored against
query . |
protected Query |
SearchEquivalenceTestBase.filteredQuery(Query query,
Query filter) |
TopDocs |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.localSearch(Query query,
int numHits) |
TopFieldDocs |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.localSearch(Query query,
int numHits,
Sort sort) |
TopDocs |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.localSearchAfter(ScoreDoc after,
Query query,
int numHits) |
protected int |
UsageTrackingQueryCachingPolicy.minFrequencyToCache(Query query)
For a given query, return how many times it should appear in the history
before being cached.
|
protected void |
LRUQueryCache.onHit(Object readerCoreKey,
Query query)
Expert: callback when there is a cache hit on a given query.
|
protected void |
LRUQueryCache.onMiss(Object readerCoreKey,
Query query)
Expert: callback when there is a cache miss on a given query.
|
protected void |
LRUQueryCache.onQueryCache(Query query,
long ramBytesUsed)
Expert: callback when a query is added to this cache.
|
protected void |
LRUQueryCache.onQueryEviction(Query query,
long ramBytesUsed)
Expert: callback when a query is evicted from this cache.
|
void |
UsageTrackingQueryCachingPolicy.onUse(Query query) |
void |
QueryCachingPolicy.onUse(Query query)
Callback that is called every time that a cached filter is used.
|
Query |
BaseExplanationTestCase.optB(Query q)
MACRO: Wraps a Query in a BooleanQuery so that it is optional, along
with a second prohibited clause which will never match anything
|
void |
BaseExplanationTestCase.qtest(Query q,
int[] expDocNrs)
check the expDocNrs match and have scores that match the explanations.
|
protected long |
LRUQueryCache.ramBytesUsed(Query query)
Return the number of bytes used by the given query.
|
Query |
BaseExplanationTestCase.reqB(Query q)
MACRO: Wraps a Query in a BooleanQuery so that it is required, along
with a second optional clause which will match everything
|
static TopDocs |
QueryRescorer.rescore(IndexSearcher searcher,
TopDocs topDocs,
Query query,
double weight,
int topN)
Sugar API, calling {#rescore} using a simple linear
combination of firstPassScore + weight * secondPassScore
|
Query |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.rewrite(Query original) |
Query |
AssertingIndexSearcher.rewrite(Query original) |
Query |
IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
|
abstract Query |
BlendedTermQuery.RewriteMethod.rewrite(Query[] subQueries)
Merge the provided sub queries into a single
Query object. |
Query |
BlendedTermQuery.DisjunctionMaxRewrite.rewrite(Query[] subQueries) |
void |
CheckHits.ExplanationAssertingSearcher.search(Query query,
Collector results) |
void |
IndexSearcher.search(Query query,
Collector results)
Lower-level search API.
|
<C extends Collector,T> |
IndexSearcher.search(Query query,
CollectorManager<C,T> collectorManager)
Lower-level search API.
|
TopDocs |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.search(Query query,
int numHits) |
TopDocs |
CheckHits.ExplanationAssertingSearcher.search(Query query,
int n) |
TopDocs |
IndexSearcher.search(Query query,
int n)
Finds the top
n
hits for query . |
TopFieldDocs |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.search(Query query,
int numHits,
Sort sort) |
TopFieldDocs |
CheckHits.ExplanationAssertingSearcher.search(Query query,
int n,
Sort sort) |
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort)
Search implementation with arbitrary sorting.
|
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Search implementation with arbitrary sorting, plus
control over whether hit scores and max score
should be computed.
|
TopDocs |
ShardSearchingTestBase.NodeState.ShardIndexSearcher.searchAfter(ScoreDoc after,
Query query,
int numHits) |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int numHits)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int n,
Sort sort)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
TopFieldDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int numHits,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Finds the top
n
hits for query where all results are after a previous
result (after ), allowing control over
whether hit scores and max score should be computed. |
boolean |
UsageTrackingQueryCachingPolicy.shouldCache(Query query) |
boolean |
QueryCachingPolicy.shouldCache(Query query)
Whether the given
Query is worth caching. |
static Query |
AssertingQuery.wrap(Random random,
Query query)
Wrap a query if necessary.
|
Constructor and Description |
---|
AssertingQuery(Random random,
Query in)
Sole constructor.
|
BlockJoinComparatorSource(Query parentsFilter,
Sort parentSort)
Create a new BlockJoinComparatorSource, sorting only blocks of documents
with
parentSort and not reordering children with a block. |
BlockJoinComparatorSource(Query parentsFilter,
Sort parentSort,
Sort childSort)
Create a new BlockJoinComparatorSource, specifying the sort order for both
blocks of documents and children within a block.
|
BooleanClause(Query query,
BooleanClause.Occur occur)
Constructs a BooleanClause.
|
BoostQuery(Query query,
float boost)
Sole constructor: wrap
query in such a way that the produced
scores will be boosted by boost . |
ConstantScoreQuery(Query query)
Strips off scores from the passed in Query.
|
ConstantScoreWeight(Query query) |
ExplanationAsserter(Query q,
String defaultFieldName,
IndexSearcher s)
Constructs an instance which does shallow tests on the Explanation
|
ExplanationAsserter(Query q,
String defaultFieldName,
IndexSearcher s,
boolean deep) |
QueryRescorer(Query query)
Sole constructor, passing the 2nd pass query to
assign scores to the 1st pass hits.
|
RandomAccessWeight(Query query)
Sole constructor.
|
RandomApproximationQuery(Query query,
Random random) |
Weight(Query query)
Sole constructor, typically invoked by sub-classes.
|
Constructor and Description |
---|
DisjunctionMaxQuery(Collection<Query> disjuncts,
float tieBreakerMultiplier)
Creates a new DisjunctionMaxQuery
|
Modifier and Type | Method and Description |
---|---|
protected TopGroups<?> |
GroupingSearch.groupByDocBlock(IndexSearcher searcher,
Query query,
int groupOffset,
int groupLimit) |
protected TopGroups |
GroupingSearch.groupByFieldOrFunction(IndexSearcher searcher,
Query query,
int groupOffset,
int groupLimit) |
<T> TopGroups<T> |
GroupingSearch.search(IndexSearcher searcher,
Query query,
int groupOffset,
int groupLimit)
Executes a grouped search.
|
Constructor and Description |
---|
GroupingSearch(Query groupEndDocs)
Constructor for grouping documents by doc block.
|
Modifier and Type | Method and Description |
---|---|
protected void |
WeightedSpanTermExtractor.extract(Query query,
float boost,
Map<String,WeightedSpanTerm> terms)
|
protected void |
WeightedSpanTermExtractor.extractUnknownQuery(Query query,
Map<String,WeightedSpanTerm> terms) |
protected void |
WeightedSpanTermExtractor.extractWeightedTerms(Map<String,WeightedSpanTerm> terms,
Query query,
float boost)
|
static WeightedTerm[] |
QueryTermExtractor.getIdfWeightedTerms(Query query,
IndexReader reader,
String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
static WeightedTerm[] |
QueryTermExtractor.getTerms(Query query)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
static WeightedTerm[] |
QueryTermExtractor.getTerms(Query query,
boolean prohibited)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
static WeightedTerm[] |
QueryTermExtractor.getTerms(Query query,
boolean prohibited,
String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTerms
|
Map<String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTerms(Query query,
float boost,
TokenStream tokenStream)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
Map<String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTerms(Query query,
float boost,
TokenStream tokenStream,
String fieldName)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
Map<String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query,
float boost,
TokenStream tokenStream,
String fieldName,
IndexReader reader)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
WeightedSpanTermExtractor.isQueryUnsupported(Class<? extends Query> clazz) |
Constructor and Description |
---|
QueryScorer(Query query) |
QueryScorer(Query query,
IndexReader reader,
String field) |
QueryScorer(Query query,
IndexReader reader,
String field,
String defaultField) |
QueryScorer(Query query,
String field) |
QueryScorer(Query query,
String field,
String defaultField) |
QueryTermScorer(Query query) |
QueryTermScorer(Query query,
IndexReader reader,
String fieldName) |
QueryTermScorer(Query query,
String fieldName) |
Modifier and Type | Class and Description |
---|---|
class |
ToChildBlockJoinQuery
Just like
ToParentBlockJoinQuery , except this
query joins in reverse: you provide a Query matching
parent documents and it joins down to child
documents. |
class |
ToParentBlockJoinQuery
This query requires that you index
children and parent docs as a single block, using the
IndexWriter.addDocuments() or IndexWriter.updateDocuments() API. |
Modifier and Type | Method and Description |
---|---|
static Query |
JoinUtil.createJoinQuery(String fromField,
boolean multipleValuesPerDocument,
String toField,
Class<? extends Number> numericType,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining for numeric fields.
|
static Query |
JoinUtil.createJoinQuery(String fromField,
boolean multipleValuesPerDocument,
String toField,
FieldType.LegacyNumericType numericType,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Deprecated.
Because
FieldType.LegacyNumericType is deprecated, instead use JoinUtil.createJoinQuery(String, boolean, String, Class, Query, IndexSearcher, ScoreMode)
Method for query time joining for numeric fields. It supports multi- and single- values longs and ints.
All considerations from JoinUtil.createJoinQuery(String, boolean, String, Query, IndexSearcher, ScoreMode) are applicable here too,
though memory consumption might be higher.
|
static Query |
JoinUtil.createJoinQuery(String fromField,
boolean multipleValuesPerDocument,
String toField,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining.
|
static Query |
JoinUtil.createJoinQuery(String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
MultiDocValues.OrdinalMap ordinalMap)
Delegates to
JoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, MultiDocValues.OrdinalMap, int, int) ,
but disables the min and max filtering. |
static Query |
JoinUtil.createJoinQuery(String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
MultiDocValues.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 |
ToChildBlockJoinQuery.rewrite(IndexReader reader) |
Query |
ToParentBlockJoinQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
static Query |
JoinUtil.createJoinQuery(String fromField,
boolean multipleValuesPerDocument,
String toField,
Class<? extends Number> numericType,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining for numeric fields.
|
static Query |
JoinUtil.createJoinQuery(String fromField,
boolean multipleValuesPerDocument,
String toField,
FieldType.LegacyNumericType numericType,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Deprecated.
Because
FieldType.LegacyNumericType is deprecated, instead use JoinUtil.createJoinQuery(String, boolean, String, Class, Query, IndexSearcher, ScoreMode)
Method for query time joining for numeric fields. It supports multi- and single- values longs and ints.
All considerations from JoinUtil.createJoinQuery(String, boolean, String, Query, IndexSearcher, ScoreMode) are applicable here too,
though memory consumption might be higher.
|
static Query |
JoinUtil.createJoinQuery(String fromField,
boolean multipleValuesPerDocument,
String toField,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining.
|
static Query |
JoinUtil.createJoinQuery(String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
MultiDocValues.OrdinalMap ordinalMap)
Delegates to
JoinUtil.createJoinQuery(String, Query, Query, IndexSearcher, ScoreMode, MultiDocValues.OrdinalMap, int, int) ,
but disables the min and max filtering. |
static Query |
JoinUtil.createJoinQuery(String joinField,
Query fromQuery,
Query toQuery,
IndexSearcher searcher,
ScoreMode scoreMode,
MultiDocValues.OrdinalMap ordinalMap,
int min,
int max)
A query time join using global ordinals over a dedicated join field.
|
Constructor and Description |
---|
QueryBitSetProducer(Query query)
Wraps another query's result and caches it into bitsets.
|
ToChildBlockJoinQuery(Query parentQuery,
BitSetProducer parentsFilter)
Create a ToChildBlockJoinQuery.
|
ToParentBlockJoinQuery(Query childQuery,
BitSetProducer parentsFilter,
ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.
|
Modifier and Type | Method and Description |
---|---|
String[] |
PostingsHighlighter.highlight(String field,
Query query,
IndexSearcher searcher,
TopDocs topDocs)
Highlights the top passages from a single field.
|
String[] |
PostingsHighlighter.highlight(String field,
Query query,
IndexSearcher searcher,
TopDocs topDocs,
int maxPassages)
Highlights the top-N passages from a single field.
|
Map<String,String[]> |
PostingsHighlighter.highlightFields(String[] fieldsIn,
Query query,
IndexSearcher searcher,
int[] docidsIn,
int[] maxPassagesIn)
Highlights the top-N passages from multiple fields,
for the provided int[] docids.
|
Map<String,String[]> |
PostingsHighlighter.highlightFields(String[] fields,
Query query,
IndexSearcher searcher,
TopDocs topDocs)
Highlights the top passages from multiple fields.
|
Map<String,String[]> |
PostingsHighlighter.highlightFields(String[] fields,
Query query,
IndexSearcher searcher,
TopDocs topDocs,
int[] maxPassages)
Highlights the top-N passages from multiple fields.
|
protected Map<String,Object[]> |
PostingsHighlighter.highlightFieldsAsObjects(String[] fieldsIn,
Query query,
IndexSearcher searcher,
int[] docidsIn,
int[] maxPassagesIn)
Expert: highlights the top-N passages from multiple fields,
for the provided int[] docids, to custom Object as
returned by the
PassageFormatter . |
Modifier and Type | Class and Description |
---|---|
class |
AssertingSpanQuery
Wraps a span query with asserts
|
class |
FieldMaskingSpanQuery
Wrapper to allow
SpanQuery objects participate in composite
single-field SpanQueries by 'lying' about their search field. |
class |
SpanBoostQuery
Counterpart of
BoostQuery for spans. |
class |
SpanContainingQuery
Keep matches that contain another SpanScorer.
|
class |
SpanFirstQuery
Matches spans near the beginning of a field.
|
class |
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
Wraps any
MultiTermQuery as a SpanQuery ,
so it can be nested within other SpanQuery classes. |
class |
SpanNearQuery
Matches spans which are near one another.
|
class |
SpanNotQuery
Removes matches which overlap with another SpanQuery or which are
within x tokens before or y tokens after another SpanQuery.
|
class |
SpanOrQuery
Matches the union of its clauses.
|
class |
SpanPositionCheckQuery
Base class for filtering a SpanQuery based on the position of a match.
|
class |
SpanPositionRangeQuery
Checks to see if the
SpanPositionCheckQuery.getMatch() lies between a start and end position
See SpanFirstQuery for a derivation that is optimized for the case where start position is 0. |
class |
SpanQuery
Base class for span-based queries.
|
class |
SpanTermQuery
Matches spans containing a term.
|
class |
SpanWithinQuery
Keep matches that are contained within another Spans.
|
Modifier and Type | Method and Description |
---|---|
Query |
AssertingSpanQuery.clone() |
Query |
SpanMultiTermQueryWrapper.getWrappedQuery()
Returns the wrapped query
|
Query |
AssertingSpanQuery.rewrite(IndexReader reader) |
Query |
FieldMaskingSpanQuery.rewrite(IndexReader reader) |
Query |
SpanNotQuery.rewrite(IndexReader reader) |
Query |
SpanPositionCheckQuery.rewrite(IndexReader reader) |
Query |
SpanMultiTermQueryWrapper.rewrite(IndexReader reader) |
Query |
SpanOrQuery.rewrite(IndexReader reader) |
Query |
SpanNearQuery.rewrite(IndexReader reader) |
Query |
SpanBoostQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
protected Query |
AnalyzingInfixSuggester.finishQuery(BooleanQuery.Builder in,
boolean allTermsRequired)
Subclass can override this to tweak the Query before
searching.
|
protected Query |
AnalyzingInfixSuggester.getLastTokenQuery(String token)
This is called if the last token isn't ended
(e.g.
|
Modifier and Type | Class and Description |
---|---|
class |
CompletionQuery
Abstract
Query that match documents containing terms with a specified prefix
filtered by BitsProducer . |
class |
ContextQuery
A
CompletionQuery that matches documents specified by
a wrapped CompletionQuery supporting boosting and/or filtering
by specified contexts. |
class |
FuzzyCompletionQuery
A
CompletionQuery that match documents containing terms
within an edit distance of the specified prefix. |
class |
PrefixCompletionQuery
A
CompletionQuery which takes an Analyzer
to analyze the prefix of the query term. |
class |
RegexCompletionQuery
A
CompletionQuery which takes a regular expression
as the prefix of the query term. |
Modifier and Type | Method and Description |
---|---|
Query |
CompletionQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
FieldQuery |
FastVectorHighlighter.getFieldQuery(Query query)
create a
FieldQuery object. |
FieldQuery |
FastVectorHighlighter.getFieldQuery(Query query,
IndexReader reader)
create a
FieldQuery object. |
Modifier and Type | Method and Description |
---|---|
abstract Query |
SpatialStrategy.makeQuery(SpatialArgs args)
|
Modifier and Type | Method and Description |
---|---|
Query |
BBoxStrategy.makeQuery(SpatialArgs args) |
Modifier and Type | Class and Description |
---|---|
class |
CompositeVerifyQuery
A Query that considers an "indexQuery" to have approximate results, and a follow-on
ValueSource /FunctionValues.boolVal(int) is called to verify each hit
from TwoPhaseIterator.matches() . |
class |
IntersectsRPTVerifyQuery
A spatial Intersects predicate that distinguishes an approximated match from an exact match based on which cells
are within the query shape.
|
Modifier and Type | Method and Description |
---|---|
Query |
CompositeSpatialStrategy.makeQuery(SpatialArgs args) |
Query |
CompositeVerifyQuery.rewrite(IndexReader reader) |
Constructor and Description |
---|
CompositeVerifyQuery(Query indexQuery,
ValueSource predicateValueSource) |
Modifier and Type | Class and Description |
---|---|
class |
GeoPointDistanceQuery
Implements a simple point distance query on a GeoPoint field.
|
class |
GeoPointInBBoxQuery
Implements a simple bounding box query on a GeoPoint field.
|
class |
GeoPointInPolygonQuery
Implements a simple point in polygon query on a GeoPoint field.
|
Modifier and Type | Method and Description |
---|---|
Query |
GeoPointInPolygonQuery.rewrite(IndexReader reader)
throw exception if trying to change rewrite method
|
Query |
GeoPointDistanceQuery.rewrite(IndexReader reader) |
Query |
GeoPointInBBoxQuery.rewrite(IndexReader reader) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractPrefixTreeQuery
Base class for Lucene Queries on SpatialPrefixTree fields.
|
class |
AbstractVisitingPrefixTreeQuery
Traverses a
SpatialPrefixTree indexed field, using the template and
visitor design patterns for subclasses to guide the traversal and collect
matching documents. |
class |
ContainsPrefixTreeQuery
Finds docs where its indexed shape
CONTAINS the query shape. |
class |
IntersectsPrefixTreeQuery
A Query matching documents that have an
SpatialRelation.INTERSECTS
(i.e. |
class |
WithinPrefixTreeQuery
Finds docs where its indexed shape is
WITHIN the query shape. |
Modifier and Type | Method and Description |
---|---|
Query |
TermQueryPrefixTreeStrategy.makeQuery(SpatialArgs args) |
Query |
RecursivePrefixTreeStrategy.makeQuery(SpatialArgs args) |
Modifier and Type | Method and Description |
---|---|
Query |
SerializedDVStrategy.makeQuery(SpatialArgs args)
Returns a Query that should be used in a random-access fashion.
|
Modifier and Type | Method and Description |
---|---|
static Query |
Geo3DPoint.newBoxQuery(String field,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
Create a query for matching a box.
|
static Query |
Geo3DPoint.newDistanceQuery(String field,
double latitude,
double longitude,
double radiusMeters)
Create a query for matching points within the specified distance of the supplied location.
|
static Query |
Geo3DPoint.newLargePolygonQuery(String field,
Polygon... polygons)
Create a query for matching a large polygon.
|
static Query |
Geo3DPoint.newPathQuery(String field,
double[] pathLatitudes,
double[] pathLongitudes,
double pathWidthMeters)
Create a query for matching a path.
|
static Query |
Geo3DPoint.newPolygonQuery(String field,
Polygon... polygons)
Create a query for matching a polygon.
|
static Query |
Geo3DPoint.newShapeQuery(String field,
GeoShape shape)
Returns a query matching all points inside the provided shape.
|
Modifier and Type | Method and Description |
---|---|
Query |
QueryBuilder.createBooleanQuery(String field,
String queryText)
Creates a boolean query from the query text.
|
Query |
QueryBuilder.createBooleanQuery(String field,
String queryText,
BooleanClause.Occur operator)
Creates a boolean query from the query text.
|
protected Query |
QueryBuilder.createFieldQuery(Analyzer analyzer,
BooleanClause.Occur operator,
String field,
String queryText,
boolean quoted,
int phraseSlop)
Creates a query from the analysis chain.
|
Query |
QueryBuilder.createMinShouldMatchQuery(String field,
String queryText,
float fraction)
Creates a minimum-should-match query from the query text.
|
Query |
QueryBuilder.createPhraseQuery(String field,
String queryText)
Creates a phrase query from the query text.
|
Query |
QueryBuilder.createPhraseQuery(String field,
String queryText,
int phraseSlop)
Creates a phrase query from the query text.
|
protected Query |
QueryBuilder.newSynonymQuery(Term[] terms)
Builds a new SynonymQuery instance.
|
protected Query |
QueryBuilder.newTermQuery(Term term)
Builds a new TermQuery instance.
|
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.