Uses of Class
org.apache.lucene.search.Query
-
Packages that use Query Package Description org.apache.lucene.index Code to maintain and access indices.org.apache.lucene.search Code to search indices.org.apache.lucene.search.payloads The payloads package provides Query mechanisms for finding and using payloads.org.apache.lucene.search.spans The calculus of spans.org.apache.lucene.util Some utility classes. -
-
Uses of Query in org.apache.lucene.index
Methods in org.apache.lucene.index with parameters of type Query Modifier and Type Method Description voidIndexWriter. deleteDocuments(Query query)Deletes the document(s) matching the provided query.voidIndexWriter. deleteDocuments(Query... queries)Deletes the document(s) matching any of the provided queries.longTrackingIndexWriter. deleteDocuments(Query q)CallsIndexWriter.deleteDocuments(Query)and returns the generation that reflects this change.longTrackingIndexWriter. 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 Query Modifier and Type Class Description classScoringRewrite<Q extends Query>Base rewrite method that translates each term into a query, and keeps the scores as computed by the query.classTopTermsRewrite<Q extends Query>Base rewrite method for collecting only the top terms via a priority queue.Subclasses of Query in org.apache.lucene.search Modifier and Type Class Description classAutomatonQueryAQuerythat will match terms against a finite-state machine.classBooleanQueryA Query that matches documents matching boolean combinations of other queries, e.g.classConstantScoreQueryA 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.classDisjunctionMaxQueryA 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.classFilteredQueryA query that applies a filter to the results of another query.classFuzzyQueryImplements the fuzzy search query.classMatchAllDocsQueryA query that matches all documents.classMultiPhraseQueryMultiPhraseQuery is a generalized version of PhraseQuery, with an added methodMultiPhraseQuery.add(Term[]).classMultiTermQueryAn abstractQuerythat matches documents containing a subset of terms provided by aFilteredTermsEnumenumeration.classNGramPhraseQueryThis is aPhraseQuerywhich is optimized for n-gram phrase query.classNumericRangeQuery<T extends Number>AQuerythat matches numeric values within a specified range.classPhraseQueryA Query that matches documents containing a particular sequence of terms.classPrefixQueryA Query that matches documents containing terms with a specified prefix.classRegexpQueryA fast regular expression query based on theorg.apache.lucene.util.automatonpackage.classTermQueryA Query that matches documents containing a term.classTermRangeQueryA Query that matches documents within an range of terms.classWildcardQueryImplements the wildcard search query.Fields in org.apache.lucene.search declared as Query Modifier and Type Field Description protected QueryConstantScoreQuery. queryMethods in org.apache.lucene.search that return Query Modifier and Type Method Description QueryQuery. clone()Returns a clone of this query.QueryBooleanClause. getQuery()QueryBooleanQuery.BooleanWeight. getQuery()QueryConstantScoreQuery.ConstantWeight. getQuery()QueryConstantScoreQuery. getQuery()Returns the encapsulated query, returnsnullif a filter is wrapped.QueryDisjunctionMaxQuery.DisjunctionMaxWeight. getQuery()Return our associated DisjunctionMaxQueryQueryFilteredQuery. getQuery()Returns this FilteredQuery's (unfiltered) QueryQueryQueryWrapperFilter. getQuery()returns the inner Queryabstract QueryWeight. getQuery()The query that this concerns.QueryBooleanQuery. rewrite(IndexReader reader)QueryConstantScoreQuery. rewrite(IndexReader reader)QueryDisjunctionMaxQuery. rewrite(IndexReader reader)Optimize our representation and our subqueries representationsQueryDocTermOrdsRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)QueryFieldCacheRewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)QueryFilteredQuery. rewrite(IndexReader reader)Rewrites the query.QueryIndexSearcher. rewrite(Query original)Expert: called to re-write queries into primitive queries.QueryMultiPhraseQuery. rewrite(IndexReader reader)QueryMultiTermQuery. rewrite(IndexReader reader)To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getTermsEnum(Terms, AttributeSource).abstract QueryMultiTermQuery.RewriteMethod. rewrite(IndexReader reader, MultiTermQuery query)QueryNGramPhraseQuery. rewrite(IndexReader reader)QueryPhraseQuery. rewrite(IndexReader reader)QueryQuery. rewrite(IndexReader reader)Expert: called to re-write queries into primitive queries.protected QueryIndexSearcher. wrapFilter(Query query, Filter filter)Methods in org.apache.lucene.search that return types with arguments of type Query Modifier and Type Method Description ArrayList<Query>DisjunctionMaxQuery. getDisjuncts()Iterator<Query>DisjunctionMaxQuery. iterator()Methods in org.apache.lucene.search with parameters of type Query Modifier and Type Method Description voidBooleanQuery. add(Query query, BooleanClause.Occur occur)Adds a clause to a boolean query.voidDisjunctionMaxQuery. add(Query query)Add a subquery to this disjunctionWeightIndexSearcher. createNormalizedWeight(Query query)Creates a normalized weight for a top-levelQuery.ExplanationIndexSearcher. explain(Query query, int doc)Returns an Explanation that describes howdocscored againstquery.QueryIndexSearcher. rewrite(Query original)Expert: called to re-write queries into primitive queries.TopDocsIndexSearcher. search(Query query, int n)Finds the topnhits forquery.TopFieldDocsIndexSearcher. search(Query query, int n, Sort sort)Search implementation with arbitrary sorting and no filter.voidIndexSearcher. search(Query query, Collector results)Lower-level search API.TopDocsIndexSearcher. search(Query query, Filter filter, int n)Finds the topnhits forquery, applyingfilterif non-null.TopFieldDocsIndexSearcher. search(Query query, Filter filter, int n, Sort sort)Search implementation with arbitrary sorting.TopFieldDocsIndexSearcher. 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.voidIndexSearcher. search(Query query, Filter filter, Collector results)Lower-level search API.TopDocsIndexSearcher. searchAfter(ScoreDoc after, Query query, int n)Finds the topnhits forquerywhere all results are after a previous result (after).TopDocsIndexSearcher. searchAfter(ScoreDoc after, Query query, int n, Sort sort)Finds the topnhits forquerywhere all results are after a previous result (after).TopDocsIndexSearcher. searchAfter(ScoreDoc after, Query query, Filter filter, int n)Finds the topnhits forquery, applyingfilterif non-null, where all results are after a previous result (after).TopDocsIndexSearcher. searchAfter(ScoreDoc after, Query query, Filter filter, int n, Sort sort)Finds the topnhits forquery, applyingfilterif non-null, where all results are after a previous result (after).TopDocsIndexSearcher. searchAfter(ScoreDoc after, Query query, Filter filter, int n, Sort sort, boolean doDocScores, boolean doMaxScore)Finds the topnhits forquerywhere all results are after a previous result (after), allowing control over whether hit scores and max score should be computed.voidBooleanClause. setQuery(Query query)protected QueryIndexSearcher. wrapFilter(Query query, Filter filter)Method parameters in org.apache.lucene.search with type arguments of type Query Modifier and Type Method Description voidDisjunctionMaxQuery. add(Collection<Query> disjuncts)Add a collection of disjuncts to this disjunction viaIterable<Query>Constructors in org.apache.lucene.search with parameters of type Query Constructor Description BooleanClause(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 Query Constructor Description DisjunctionMaxQuery(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.payloads Modifier and Type Class Description classPayloadNearQueryThis class is very similar toSpanNearQueryexcept that it factors in the value of the payloads located at each of the positions where theTermSpansoccurs.classPayloadTermQueryThis class is very similar toSpanTermQueryexcept that it factors in the value of the payload located at each of the positions where theTermoccurs.Methods in org.apache.lucene.search.payloads with parameters of type Query Modifier and Type Method Description Collection<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.spans Modifier and Type Class Description classFieldMaskingSpanQueryWrapper to allowSpanQueryobjects participate in composite single-field SpanQueries by 'lying' about their search field.classSpanFirstQueryMatches spans near the beginning of a field.classSpanMultiTermQueryWrapper<Q extends MultiTermQuery>Wraps anyMultiTermQueryas aSpanQuery, so it can be nested within other SpanQuery classes.classSpanNearPayloadCheckQueryOnly return those matches that have a specific payload at the given position.classSpanNearQueryMatches spans which are near one another.classSpanNotQueryRemoves matches which overlap with another SpanQuery or within a x tokens before or y tokens after another SpanQuery.classSpanOrQueryMatches the union of its clauses.classSpanPayloadCheckQueryOnly return those matches that have a specific payload at the given position.classSpanPositionCheckQueryBase class for filtering a SpanQuery based on the position of a match.classSpanPositionRangeQueryChecks to see if theSpanPositionCheckQuery.getMatch()lies between a start and end positionclassSpanQueryBase class for span-based queries.classSpanTermQueryMatches spans containing a term.Methods in org.apache.lucene.search.spans that return Query Modifier and Type Method Description QuerySpanWeight. getQuery()QuerySpanMultiTermQueryWrapper. getWrappedQuery()Returns the wrapped queryQueryFieldMaskingSpanQuery. rewrite(IndexReader reader)QuerySpanMultiTermQueryWrapper. rewrite(IndexReader reader)QuerySpanNearQuery. rewrite(IndexReader reader)QuerySpanNotQuery. rewrite(IndexReader reader)QuerySpanOrQuery. rewrite(IndexReader reader)QuerySpanPositionCheckQuery. rewrite(IndexReader reader) -
Uses of Query in org.apache.lucene.util
Methods in org.apache.lucene.util that return Query Modifier and Type Method Description QueryQueryBuilder. createBooleanQuery(String field, String queryText)Creates a boolean query from the query text.QueryQueryBuilder. createBooleanQuery(String field, String queryText, BooleanClause.Occur operator)Creates a boolean query from the query text.protected QueryQueryBuilder. createFieldQuery(Analyzer analyzer, BooleanClause.Occur operator, String field, String queryText, boolean quoted, int phraseSlop)Creates a query from the analysis chain.QueryQueryBuilder. createMinShouldMatchQuery(String field, String queryText, float fraction)Creates a minimum-should-match query from the query text.QueryQueryBuilder. createPhraseQuery(String field, String queryText)Creates a phrase query from the query text.QueryQueryBuilder. createPhraseQuery(String field, String queryText, int phraseSlop)Creates a phrase query from the query text.protected QueryQueryBuilder. newTermQuery(Term term)Builds a new TermQuery instance.
-