Uses of Class
org.apache.lucene.search.Query
Packages that use Query
Package
Description
Code to maintain and access indices.
Code to search indices.
The payloads package provides Query mechanisms for finding and using payloads.
The calculus of spans.
Some utility classes.
-
Uses of Query in org.apache.lucene.index
Methods in org.apache.lucene.index with parameters of type QueryModifier and TypeMethodDescriptionvoid
IndexWriter.deleteDocuments
(Query query) Deletes the document(s) matching the provided query.void
IndexWriter.deleteDocuments
(Query... queries) Deletes the document(s) matching any of the provided queries.long
TrackingIndexWriter.deleteDocuments
(Query q) CallsIndexWriter.deleteDocuments(Query)
and returns the generation that reflects this change.long
TrackingIndexWriter.deleteDocuments
(Query... queries) CallsIndexWriter.deleteDocuments(Query...)
and returns the generation that reflects this change. -
Uses of Query in org.apache.lucene.search
Classes in org.apache.lucene.search with type parameters of type QueryModifier and TypeClassDescriptionclass
ScoringRewrite<Q extends Query>
Base rewrite method that translates each term into a query, and keeps the scores as computed by the query.class
TopTermsRewrite<Q extends Query>
Base rewrite method for collecting only the top terms via a priority queue.Subclasses of Query in org.apache.lucene.searchModifier and TypeClassDescriptionclass
AQuery
that will match terms against a finite-state machine.class
A Query that matches documents matching boolean combinations of other queries, e.g.class
A query that wraps another query or a filter and simply returns a constant score equal to the query boost for every document that matches the filter or query.class
A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.class
A query that applies a filter to the results of another query.class
Implements the fuzzy search query.class
A query that matches all documents.class
MultiPhraseQuery is a generalized version of PhraseQuery, with an added methodMultiPhraseQuery.add(Term[])
.class
An abstractQuery
that matches documents containing a subset of terms provided by aFilteredTermsEnum
enumeration.class
This is aPhraseQuery
which is optimized for n-gram phrase query.final class
NumericRangeQuery<T extends Number>
AQuery
that matches numeric values within a specified range.class
A Query that matches documents containing a particular sequence of terms.class
A Query that matches documents containing terms with a specified prefix.class
A fast regular expression query based on theorg.apache.lucene.util.automaton
package.class
A Query that matches documents containing a term.class
A Query that matches documents within an range of terms.class
Implements the wildcard search query.Fields in org.apache.lucene.search declared as QueryMethods in org.apache.lucene.search that return QueryModifier and TypeMethodDescriptionQuery.clone()
Returns a clone of this query.BooleanClause.getQuery()
BooleanQuery.BooleanWeight.getQuery()
ConstantScoreQuery.ConstantWeight.getQuery()
ConstantScoreQuery.getQuery()
Returns the encapsulated query, returnsnull
if a filter is wrapped.DisjunctionMaxQuery.DisjunctionMaxWeight.getQuery()
Return our associated DisjunctionMaxQueryfinal Query
FilteredQuery.getQuery()
Returns this FilteredQuery's (unfiltered) Queryfinal Query
QueryWrapperFilter.getQuery()
returns the inner Queryabstract Query
Weight.getQuery()
The query that this concerns.BooleanQuery.rewrite
(IndexReader reader) ConstantScoreQuery.rewrite
(IndexReader reader) DisjunctionMaxQuery.rewrite
(IndexReader reader) Optimize our representation and our subqueries representationsDocTermOrdsRewriteMethod.rewrite
(IndexReader reader, MultiTermQuery query) FieldCacheRewriteMethod.rewrite
(IndexReader reader, MultiTermQuery query) FilteredQuery.rewrite
(IndexReader reader) Rewrites the query.Expert: called to re-write queries into primitive queries.MultiPhraseQuery.rewrite
(IndexReader reader) final Query
MultiTermQuery.rewrite
(IndexReader reader) To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getTermsEnum(Terms, AttributeSource)
.abstract Query
MultiTermQuery.RewriteMethod.rewrite
(IndexReader reader, MultiTermQuery query) NGramPhraseQuery.rewrite
(IndexReader reader) PhraseQuery.rewrite
(IndexReader reader) Query.rewrite
(IndexReader reader) Expert: called to re-write queries into primitive queries.protected Query
IndexSearcher.wrapFilter
(Query query, Filter filter) Methods in org.apache.lucene.search that return types with arguments of type QueryModifier and TypeMethodDescriptionDisjunctionMaxQuery.getDisjuncts()
DisjunctionMaxQuery.iterator()
Methods in org.apache.lucene.search with parameters of type QueryModifier and TypeMethodDescriptionvoid
BooleanQuery.add
(Query query, BooleanClause.Occur occur) Adds a clause to a boolean query.void
Add a subquery to this disjunctionIndexSearcher.createNormalizedWeight
(Query query) Creates a normalized weight for a top-levelQuery
.Returns an Explanation that describes howdoc
scored againstquery
.Expert: called to re-write queries into primitive queries.Finds the topn
hits forquery
.Search implementation with arbitrary sorting and no filter.void
Lower-level search API.Finds the topn
hits forquery
, applyingfilter
if non-null.Search implementation with arbitrary sorting.IndexSearcher.search
(Query query, Filter filter, 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.void
Lower-level search API.IndexSearcher.searchAfter
(ScoreDoc after, Query query, int n) Finds the topn
hits forquery
where all results are after a previous result (after
).IndexSearcher.searchAfter
(ScoreDoc after, Query query, int n, Sort sort) Finds the topn
hits forquery
where all results are after a previous result (after
).IndexSearcher.searchAfter
(ScoreDoc after, Query query, Filter filter, int n) Finds the topn
hits forquery
, applyingfilter
if non-null, where all results are after a previous result (after
).IndexSearcher.searchAfter
(ScoreDoc after, Query query, Filter filter, int n, Sort sort) Finds the topn
hits forquery
, applyingfilter
if non-null, where all results are after a previous result (after
).IndexSearcher.searchAfter
(ScoreDoc after, Query query, Filter filter, int n, Sort sort, boolean doDocScores, boolean doMaxScore) 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.void
protected Query
IndexSearcher.wrapFilter
(Query query, Filter filter) Method parameters in org.apache.lucene.search with type arguments of type QueryModifier and TypeMethodDescriptionvoid
DisjunctionMaxQuery.add
(Collection<Query> disjuncts) Add a collection of disjuncts to this disjunction viaIterable<Query>
Constructors in org.apache.lucene.search with parameters of type QueryModifierConstructorDescriptionBooleanClause
(Query query, BooleanClause.Occur occur) Constructs a BooleanClause.ConstantScoreQuery
(Query query) Strips off scores from the passed in Query.FilteredQuery
(Query query, Filter filter) Constructs a new query which applies a filter to the results of the original query.FilteredQuery
(Query query, Filter filter, FilteredQuery.FilterStrategy strategy) Expert: Constructs a new query which applies a filter to the results of the original query.QueryWrapperFilter
(Query query) Constructs a filter which only matches documents matchingquery
.Constructor parameters in org.apache.lucene.search with type arguments of type QueryModifierConstructorDescriptionDisjunctionMaxQuery
(Collection<Query> disjuncts, float tieBreakerMultiplier) Creates a new DisjunctionMaxQuery -
Uses of Query in org.apache.lucene.search.payloads
Subclasses of Query in org.apache.lucene.search.payloadsModifier and TypeClassDescriptionclass
This class is very similar toSpanNearQuery
except that it factors in the value of the payloads located at each of the positions where theTermSpans
occurs.class
This class is very similar toSpanTermQuery
except that it factors in the value of the payload located at each of the positions where theTerm
occurs.Methods in org.apache.lucene.search.payloads with parameters of type QueryModifier and TypeMethodDescriptionCollection<byte[]>
PayloadSpanUtil.getPayloadsForQuery
(Query query) Query should be rewritten for wild/fuzzy support. -
Uses of Query in org.apache.lucene.search.spans
Subclasses of Query in org.apache.lucene.search.spansModifier and TypeClassDescriptionclass
Wrapper to allowSpanQuery
objects participate in composite single-field SpanQueries by 'lying' about their search field.class
Matches spans near the beginning of a field.class
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
Wraps anyMultiTermQuery
as aSpanQuery
, so it can be nested within other SpanQuery classes.class
Only return those matches that have a specific payload at the given position.class
Matches spans which are near one another.class
Removes matches which overlap with another SpanQuery or within a x tokens before or y tokens after another SpanQuery.class
Matches the union of its clauses.class
Only return those matches that have a specific payload at the given position.class
Base class for filtering a SpanQuery based on the position of a match.class
Checks to see if theSpanPositionCheckQuery.getMatch()
lies between a start and end positionclass
Base class for span-based queries.class
Matches spans containing a term.Methods in org.apache.lucene.search.spans that return QueryModifier and TypeMethodDescriptionSpanWeight.getQuery()
SpanMultiTermQueryWrapper.getWrappedQuery()
Returns the wrapped queryFieldMaskingSpanQuery.rewrite
(IndexReader reader) SpanMultiTermQueryWrapper.rewrite
(IndexReader reader) SpanNearQuery.rewrite
(IndexReader reader) SpanNotQuery.rewrite
(IndexReader reader) SpanOrQuery.rewrite
(IndexReader reader) SpanPositionCheckQuery.rewrite
(IndexReader reader) -
Uses of Query in org.apache.lucene.util
Methods in org.apache.lucene.util that return QueryModifier and TypeMethodDescriptionQueryBuilder.createBooleanQuery
(String field, String queryText) Creates a boolean query from the query text.QueryBuilder.createBooleanQuery
(String field, String queryText, BooleanClause.Occur operator) Creates a boolean query from the query text.protected final Query
QueryBuilder.createFieldQuery
(Analyzer analyzer, BooleanClause.Occur operator, String field, String queryText, boolean quoted, int phraseSlop) Creates a query from the analysis chain.QueryBuilder.createMinShouldMatchQuery
(String field, String queryText, float fraction) Creates a minimum-should-match query from the query text.QueryBuilder.createPhraseQuery
(String field, String queryText) Creates a phrase query from the query text.QueryBuilder.createPhraseQuery
(String field, String queryText, int phraseSlop) Creates a phrase query from the query text.protected Query
QueryBuilder.newTermQuery
(Term term) Builds a new TermQuery instance.