Uses of Class
org.apache.lucene.search.Query
-
Packages that use Query 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.demo Demo applications for indexing and searching.org.apache.lucene.facet.search Faceted Search APIorg.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.queryParser A simple query parser implemented with JavaCC.org.apache.lucene.queryParser.analyzing QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.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.standard Contains the implementation of the Lucene query parser using the flexible query parser frameworksorg.apache.lucene.queryParser.standard.builders Standard Lucene Query Node Buildersorg.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.org.apache.lucene.search Code to search indices.org.apache.lucene.search.function Programmatic control over documents scores.org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.org.apache.lucene.search.join This modules support index-time and query-time joins.org.apache.lucene.search.payloads The payloads package provides Query mechanisms for finding and using payloads.org.apache.lucene.search.regex Regular expression Query.org.apache.lucene.search.similar Document similarity query generators.org.apache.lucene.search.spans The calculus of spans.org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.org.apache.lucene.spatial.tier Support for filtering based upon geographic location.org.apache.lucene.xmlparser Parser that produces Lucene Query objects from XML streams.org.apache.lucene.xmlparser.builders Builders to support various Lucene queries. -
-
Uses of Query in org.apache.lucene.benchmark.byTask.feeds
Fields in org.apache.lucene.benchmark.byTask.feeds declared as Query Modifier and Type Field Description protected Query[]AbstractQueryMaker. queriesMethods in org.apache.lucene.benchmark.byTask.feeds that return Query Modifier and Type Method Description QueryAbstractQueryMaker. makeQuery()QueryAbstractQueryMaker. makeQuery(int size)QueryLongToEnglishQueryMaker. makeQuery()QueryLongToEnglishQueryMaker. makeQuery(int size)QueryQueryMaker. makeQuery()Create the next queryQueryQueryMaker. makeQuery(int size)Create the next query, of the given size.protected abstract Query[]AbstractQueryMaker. prepareQueries()protected Query[]EnwikiQueryMaker. prepareQueries()protected Query[]FileBasedQueryMaker. prepareQueries()protected Query[]ReutersQueryMaker. prepareQueries()protected Query[]SimpleQueryMaker. prepareQueries()Prepare the queries for this test.protected Query[]SimpleSloppyPhraseQueryMaker. prepareQueries() -
Uses of Query in org.apache.lucene.benchmark.byTask.tasks
Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type Query Modifier and Type Method Description protected BenchmarkHighlighterReadTask. getBenchmarkHighlighter(Query q)Return an appropriate highlighter to be used with highlighting tasksprotected BenchmarkHighlighterSearchTravRetHighlightTask. getBenchmarkHighlighter(Query q)protected BenchmarkHighlighterSearchTravRetVectorHighlightTask. getBenchmarkHighlighter(Query q) -
Uses of Query in org.apache.lucene.benchmark.quality
Methods in org.apache.lucene.benchmark.quality that return Query Modifier and Type Method Description QueryQualityQueryParser. parse(QualityQuery qq)Parse a given QualityQuery into a Lucene query. -
Uses of Query in org.apache.lucene.benchmark.quality.utils
Methods in org.apache.lucene.benchmark.quality.utils that return Query Modifier and Type Method Description QuerySimpleQQParser. parse(QualityQuery qq) -
Uses of Query in org.apache.lucene.demo
Methods in org.apache.lucene.demo with parameters of type Query Modifier and Type Method Description static voidSearchFiles. 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. -
Uses of Query in org.apache.lucene.facet.search
Methods in org.apache.lucene.facet.search that return Query Modifier and Type Method Description static QueryDrillDown. query(FacetIndexingParams iParams, CategoryPath... paths)Return a query for drilling down into all given categories (AND).static QueryDrillDown. query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths)Turn a base query into a drilling-down query for all given category paths (AND).static QueryDrillDown. query(FacetSearchParams sParams, CategoryPath... paths)Return a query for drilling down into all given categories (AND).static QueryDrillDown. query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths)Turn a base query into a drilling-down query for all given category paths (AND).static QueryDrillDown. query(Query baseQuery, CategoryPath... paths)Turn a base query into a drilling-down query using the defaultFacetSearchParamsMethods in org.apache.lucene.facet.search with parameters of type Query Modifier and Type Method Description static QueryDrillDown. query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths)Turn a base query into a drilling-down query for all given category paths (AND).static QueryDrillDown. query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths)Turn a base query into a drilling-down query for all given category paths (AND).static QueryDrillDown. query(Query baseQuery, CategoryPath... paths)Turn a base query into a drilling-down query using the defaultFacetSearchParams -
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.voidRandomIndexWriter. deleteDocuments(Query q) -
Uses of Query in org.apache.lucene.index.memory
Methods in org.apache.lucene.index.memory with parameters of type Query Modifier and Type Method Description floatMemoryIndex. search(Query query)Convenience method that efficiently returns the relevance score by matching this index against the given Lucene query expression. -
Uses of Query in org.apache.lucene.queryParser
Methods in org.apache.lucene.queryParser that return Query Modifier and Type Method Description QueryQueryParser. Clause(String field)protected QueryQueryParser. getBooleanQuery(List<BooleanClause> clauses)Factory method for generating query, given a set of clauses.protected QueryQueryParser. getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)Factory method for generating query, given a set of clauses.protected QueryMultiFieldQueryParser. getFieldQuery(String field, String queryText, boolean quoted)protected QueryMultiFieldQueryParser. getFieldQuery(String field, String queryText, int slop)protected QueryQueryParser. getFieldQuery(String field, String queryText)Deprecated.UseQueryParser.getFieldQuery(String,String,boolean)instead.protected QueryQueryParser. getFieldQuery(String field, String queryText, boolean quoted)protected QueryQueryParser. getFieldQuery(String field, String queryText, int slop)Base implementation delegates toQueryParser.getFieldQuery(String,String,boolean).protected QueryMultiFieldQueryParser. getFuzzyQuery(String field, String termStr, float minSimilarity)protected QueryQueryParser. getFuzzyQuery(String field, String termStr, float minSimilarity)Factory method for generating a query (similar toQueryParser.getWildcardQuery(java.lang.String, java.lang.String)).protected QueryQueryParserTestBase.QPTestParser. getFuzzyQuery(String field, String termStr, float minSimilarity)protected QueryMultiFieldQueryParser. getPrefixQuery(String field, String termStr)protected QueryQueryParser. getPrefixQuery(String field, String termStr)Factory method for generating a query (similar toQueryParser.getWildcardQuery(java.lang.String, java.lang.String)).QueryQueryParserTestBase. getQuery(String query, Analyzer a)QueryQueryParserTestBase. getQueryDOA(String query, Analyzer a)protected QueryMultiFieldQueryParser. getRangeQuery(String field, String part1, String part2, boolean inclusive)protected QueryQueryParser. getRangeQuery(String field, String part1, String part2, boolean inclusive)protected QueryMultiFieldQueryParser. getWildcardQuery(String field, String termStr)protected QueryQueryParser. getWildcardQuery(String field, String termStr)Factory method for generating a query.protected QueryQueryParserTestBase.QPTestParser. getWildcardQuery(String field, String termStr)protected QueryQueryParser. newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength)Builds a new FuzzyQuery instanceprotected QueryQueryParser. newMatchAllDocsQuery()Builds a new MatchAllDocsQuery instanceprotected QueryQueryParser. newPrefixQuery(Term prefix)Builds a new PrefixQuery instanceprotected QueryQueryParser. newRangeQuery(String field, String part1, String part2, boolean inclusive)Builds a new TermRangeQuery instanceprotected QueryQueryParser. newTermQuery(Term term)Builds a new TermQuery instanceprotected QueryQueryParser. newWildcardQuery(Term t)Builds a new WildcardQuery instancestatic QueryMultiFieldQueryParser. parse(Version matchVersion, String[] queries, String[] fields, Analyzer analyzer)Parses a query which searches on the fields specified.static QueryMultiFieldQueryParser. parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)Parses a query, searching on the fields specified.static QueryMultiFieldQueryParser. parse(Version matchVersion, String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)Parses a query, searching on the fields specified.QueryQueryParser. parse(String query)Parses a query string, returning aQuery.QueryQueryParser. Query(String field)QueryQueryParser. Term(String field)QueryQueryParser. TopLevelQuery(String field)Methods in org.apache.lucene.queryParser with parameters of type Query Modifier and Type Method Description protected voidQueryParser. addClause(List<BooleanClause> clauses, int conj, int mods, Query q)protected BooleanClauseQueryParser. newBooleanClause(Query q, BooleanClause.Occur occur)Builds a new BooleanClause instance -
Uses of Query in org.apache.lucene.queryParser.analyzing
Methods in org.apache.lucene.queryParser.analyzing that return Query Modifier and Type Method Description protected QueryAnalyzingQueryParser. getFuzzyQuery(String field, String termStr, float minSimilarity)Called when parser parses an input term token that has the fuzzy suffix (~) appended.protected QueryAnalyzingQueryParser. getPrefixQuery(String field, String termStr)Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character.protected QueryAnalyzingQueryParser. getRangeQuery(String field, String part1, String part2, boolean inclusive)Overrides super class, by passing terms through analyzer.protected QueryAnalyzingQueryParser. getWildcardQuery(String field, String termStr)Called when parser parses an input term token that contains one or more wildcard characters (like*), but is not a prefix term token (one that has just a single * character at the end). -
Uses of Query in org.apache.lucene.queryParser.complexPhrase
Methods in org.apache.lucene.queryParser.complexPhrase that return Query Modifier and Type Method Description protected QueryComplexPhraseQueryParser. getFieldQuery(String field, String queryText, int slop)protected QueryComplexPhraseQueryParser. getFuzzyQuery(String field, String termStr, float minSimilarity)protected QueryComplexPhraseQueryParser. getRangeQuery(String field, String part1, String part2, boolean inclusive)protected QueryComplexPhraseQueryParser. getWildcardQuery(String field, String termStr)protected QueryComplexPhraseQueryParser. newRangeQuery(String field, String part1, String part2, boolean inclusive)protected QueryComplexPhraseQueryParser. newTermQuery(Term term)QueryComplexPhraseQueryParser. parse(String query) -
Uses of Query in org.apache.lucene.queryParser.ext
Methods in org.apache.lucene.queryParser.ext that return Query Modifier and Type Method Description protected QueryExtendableQueryParser. getFieldQuery(String field, String queryText, boolean quoted)abstract QueryParserExtension. parse(ExtensionQuery query)Processes the givenExtensionQueryand returns a correspondingQueryinstance. -
Uses of Query in org.apache.lucene.queryParser.standard
Methods in org.apache.lucene.queryParser.standard that return Query Modifier and Type Method Description protected QueryQueryParserWrapper. getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)Deprecated.protected QueryQueryParserWrapper. getFieldQuery(String field, String queryText)Deprecated.protected QueryQueryParserWrapper. getFieldQuery(String field, String queryText, boolean quoted)Deprecated.protected QueryQueryParserWrapper. getFieldQuery(String field, String queryText, int slop)Deprecated.Base implementation delegates toQueryParserWrapper.getFieldQuery(String,String).protected QueryQueryParserWrapper. getFuzzyQuery(String field, String termStr, float minSimilarity)Deprecated.protected QueryQueryParserWrapper. getPrefixQuery(String field, String termStr)Deprecated.protected QueryQueryParserWrapper. getRangeQuery(String field, String part1, String part2, boolean inclusive)Deprecated.protected QueryQueryParserWrapper. getWildcardQuery(String field, String termStr)Deprecated.static QueryMultiFieldQueryParserWrapper. parse(String[] queries, String[] fields, Analyzer analyzer)Deprecated.Parses a query which searches on the fields specified.static QueryMultiFieldQueryParserWrapper. parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)Deprecated.Parses a query, searching on the fields specified.static QueryMultiFieldQueryParserWrapper. parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)Deprecated.Parses a query, searching on the fields specified.static QueryQueryParserUtil. parse(String[] queries, String[] fields, Analyzer analyzer)Parses a query which searches on the fields specified.static QueryQueryParserUtil. parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)Parses a query, searching on the fields specified.static QueryQueryParserUtil. parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)Parses a query, searching on the fields specified.QueryQueryParserWrapper. parse(String query)Deprecated.QueryStandardQueryParser. parse(String query, String defaultField)OverridesQueryParserHelper.parse(String, String)so it casts the return object toQuery. -
Uses of Query in org.apache.lucene.queryParser.standard.builders
Methods in org.apache.lucene.queryParser.standard.builders that return Query Modifier and Type Method Description QueryBoostQueryNodeBuilder. build(QueryNode queryNode)QueryGroupQueryNodeBuilder. build(QueryNode queryNode)QueryModifierQueryNodeBuilder. build(QueryNode queryNode)QuerySlopQueryNodeBuilder. build(QueryNode queryNode)QueryStandardQueryBuilder. build(QueryNode queryNode)QueryStandardQueryTreeBuilder. build(QueryNode queryNode) -
Uses of Query in org.apache.lucene.queryParser.surround.query
Fields in org.apache.lucene.queryParser.surround.query declared as Query Modifier and Type Field Description static QuerySrndQuery. theEmptyLcnQueryMethods in org.apache.lucene.queryParser.surround.query that return Query Modifier and Type Method Description QueryDistanceQuery. getSpanNearQuery(IndexReader reader, String fieldName, float boost, BasicQueryFactory qf)QuerySrndQuery. makeLuceneQueryField(String fieldName, BasicQueryFactory qf)QueryAndQuery. makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)QueryDistanceQuery. makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)QueryFieldsQuery. makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)QueryNotQuery. makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)QueryOrQuery. makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)QuerySimpleTerm. makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)abstract QuerySrndQuery. makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)QueryFieldsQuery. makeLuceneQueryNoBoost(BasicQueryFactory qf)Methods in org.apache.lucene.queryParser.surround.query that return types with arguments of type Query Modifier and Type Method Description List<Query>ComposedQuery. makeLuceneSubQueriesField(String fn, BasicQueryFactory qf)Methods in org.apache.lucene.queryParser.surround.query with parameters of type Query Modifier and Type Method Description voidSpanNearClauseFactory. addSpanNearQuery(Query q) -
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 static classScorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>A callback to gather information from a scorer and its sub-scorers.static classScorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>A callback to gather information from a scorer and its sub-scorers.classScoringRewrite<Q extends 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 classBooleanQueryA Query that matches documents matching boolean combinations of other queries, e.g.classBoostingQueryThe BoostingQuery class can be used to effectively demote results that match a given query.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.classFuzzyLikeThisQueryFuzzifies ALL terms provided as strings and then picks the best n differentiating terms.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 aFilteredTermEnumenumeration.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.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. combine(Query[] queries)Expert: called when re-writing queries under MultiSearcher.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()abstract QueryWeight. getQuery()The query that this concerns.static QueryQuery. mergeBooleanQueries(BooleanQuery... queries)Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.QueryBooleanQuery. rewrite(IndexReader reader)QueryBoostingQuery. rewrite(IndexReader reader)QueryConstantScoreQuery. rewrite(IndexReader reader)QueryDisjunctionMaxQuery. rewrite(IndexReader reader)Optimize our representation and our subqueries representationsQueryFilteredQuery. rewrite(IndexReader reader)Rewrites the wrapped query.QueryFuzzyLikeThisQuery. rewrite(IndexReader reader)QueryIndexSearcher. rewrite(Query original)Expert: called to re-write queries into primitive queries.QueryMultiPhraseQuery. rewrite(IndexReader reader)QueryMultiSearcher. rewrite(Query original)Deprecated.QueryMultiTermQuery. rewrite(IndexReader reader)To rewrite to a simpler form, instead return a simpler enum fromMultiTermQuery.getEnum(IndexReader).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.QueryRemoteSearchable. rewrite(Query original)Deprecated.QuerySearchable. rewrite(Query query)Deprecated.Expert: called to re-write queries into primitive queries.abstract QuerySearcher. rewrite(Query query)Deprecated.Methods in org.apache.lucene.search that return types with arguments of type Query Modifier and Type Method Description Iterator<Query>DisjunctionMaxQuery. iterator()An Iteratorover the disjuncts 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 disjunctionvoidSearchEquivalenceTestBase. assertSameSet(Query q1, Query q2)Asserts that the documents returned byq1are the same as of those returned byq2voidSearchEquivalenceTestBase. assertSubsetOf(Query q1, Query q2)Asserts that the documents returned byq1are a subset of those returned byq2protected voidSearchEquivalenceTestBase. assertSubsetOf(Query q1, Query q2, Filter filter)Asserts that the documents returned byq1are a subset of those returned byq2.static voidQueryUtils. check(Random random, Query q1, Searcher s)Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.static voidQueryUtils. check(Random random, Query q1, Searcher s, boolean wrap)static voidQueryUtils. check(Query q)Check the types of things query objects should be able to do.static voidCheckHits. checkEqual(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2)static voidQueryUtils. checkEqual(Query q1, Query q2)static voidCheckHits. checkExplanations(Query query, String defaultFieldName, Searcher searcher)Asserts that the explanation value for every document matching a query corresponds with the true score.static voidCheckHits. checkExplanations(Query query, String defaultFieldName, Searcher searcher, boolean deep)Asserts that the explanation value for every document matching a query corresponds with the true score.protected voidCheckHits.ExplanationAssertingSearcher. checkExplanations(Query q)static voidQueryUtils. checkExplanations(Query q, Searcher s)deep check that explanations of a query 'score' correctlystatic voidQueryUtils. checkHashEquals(Query q)check very basic hashCode and equalsstatic voidCheckHits. checkHitCollector(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results)Tests that a query matches the an expected set of documents using a HitCollector.static voidCheckHits. checkHits(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results)Tests that a query matches the an expected set of documents using Hits.static voidCheckHits. 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 voidCheckHits. checkNoMatchExplanations(Query q, String defaultFieldName, Searcher 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 matchstatic voidQueryUtils. checkSkipTo(Query q, IndexSearcher s)alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scoresstatic voidQueryUtils. checkUnequal(Query q1, Query q2)QueryQuery. combine(Query[] queries)Expert: called when re-writing queries under MultiSearcher.WeightAssertingIndexSearcher. createNormalizedWeight(Query query)Ensures, that the returnedWeightis not normalized again, which may produce wrong scores.WeightIndexSearcher. createNormalizedWeight(Query query)Creates a normalized weight for a top-levelQuery.WeightMultiSearcher. createNormalizedWeight(Query original)Deprecated.Create weight in multiple index scenario.WeightSearcher. createNormalizedWeight(Query query)Deprecated.Creates a normalized weight for a top-levelQuery.protected WeightSearcher. createWeight(Query query)Deprecated.never ever use this method inWeightimplementations.longNRTManager.TrackingIndexWriter. deleteDocuments(Query q)longNRTManager.TrackingIndexWriter. deleteDocuments(Query... queries)ExplanationIndexSearcher. explain(Query query, int doc)Returns an Explanation that describes howdocscored againstquery.ExplanationSearcher. explain(Query query, int doc)Deprecated.Returns an Explanation that describes howdocscored againstquery.QueryIndexSearcher. rewrite(Query original)Expert: called to re-write queries into primitive queries.QueryMultiSearcher. rewrite(Query original)Deprecated.QueryRemoteSearchable. rewrite(Query original)Deprecated.QuerySearchable. rewrite(Query query)Deprecated.Expert: called to re-write queries into primitive queries.abstract QuerySearcher. rewrite(Query query)Deprecated.voidCheckHits.ExplanationAssertingSearcher. search(Query query, Collector results)TopDocsCheckHits.ExplanationAssertingSearcher. search(Query query, Filter filter, int n)TopFieldDocsCheckHits.ExplanationAssertingSearcher. search(Query query, Filter filter, int n, Sort sort)voidCheckHits.ExplanationAssertingSearcher. search(Query query, Filter filter, Collector results)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.voidIndexSearcher. search(Query query, Filter filter, Collector results)Lower-level search API.TopDocsSearcher. search(Query query, int n)Deprecated.Finds the topnhits forquery.TopFieldDocsSearcher. search(Query query, int n, Sort sort)Deprecated.Search implementation with arbitrary sorting and no filter.voidSearcher. search(Query query, Collector results)Deprecated.Lower-level search API.TopDocsSearcher. search(Query query, Filter filter, int n)Deprecated.Finds the topnhits forquery, applyingfilterif non-null.TopFieldDocsSearcher. search(Query query, Filter filter, int n, Sort sort)Deprecated.Search implementation with arbitrary sorting.voidSearcher. search(Query query, Filter filter, Collector results)Deprecated.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, Filter filter, int n)Finds the topnhits forquery, applyingfilterif non-null, where all results are after a previous result (after).voidBooleanClause. setQuery(Query query)voidScorer. visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor)Scorersubclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers viaScorer.ScorerVisitorMethod 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 via IterablevoidScorer. visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor)Expert: call this to gather details for all sub-scorers for this query.voidScorer. visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor)Expert: call this to gather details for all sub-scorers for this query.voidScorer. visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor)Scorersubclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers viaScorer.ScorerVisitorvoidScorer. visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor)Scorersubclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers viaScorer.ScorerVisitorConstructors in org.apache.lucene.search with parameters of type Query Constructor Description BooleanClause(Query query, BooleanClause.Occur occur)Constructs a BooleanClause.BoostingQuery(Query match, Query context, float boost)ConstantScoreQuery(Query query)Strips off scores from the passed in Query.ExplanationAsserter(Query q, String defaultFieldName, Searcher s)Constructs an instance which does shallow tests on the ExplanationExplanationAsserter(Query q, String defaultFieldName, Searcher s, boolean deep)FilteredQuery(Query query, Filter filter)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.function
Subclasses of Query in org.apache.lucene.search.function Modifier and Type Class Description classCustomScoreQueryQuery that sets document score as a programmatic function of several (sub) scores: the score of its subQuery (any query) (optional) the score of its ValueSourceQuery (or queries).classFieldScoreQueryA query that scores each document as the value of the numeric input field.classValueSourceQueryExpert: A Query that sets the scores of document to the values obtained from aValueSource.Methods in org.apache.lucene.search.function that return Query Modifier and Type Method Description QueryCustomScoreQuery. rewrite(IndexReader reader)QueryValueSourceQuery. rewrite(IndexReader reader)Constructors in org.apache.lucene.search.function with parameters of type Query Constructor Description CustomScoreQuery(Query subQuery)Create a CustomScoreQuery over input subQuery.CustomScoreQuery(Query subQuery, ValueSourceQuery valSrcQuery)Create a CustomScoreQuery over input subQuery and aValueSourceQuery.CustomScoreQuery(Query subQuery, ValueSourceQuery... valSrcQueries)Create a CustomScoreQuery over input subQuery and aValueSourceQuery. -
Uses of Query in org.apache.lucene.search.highlight
Methods in org.apache.lucene.search.highlight with parameters of type Query Modifier and Type Method Description protected voidWeightedSpanTermExtractor. extract(Query query, Map<String,WeightedSpanTerm> terms)Fills aMapwith <@link WeightedSpanTerm>s using the terms from the suppliedQuery.protected voidWeightedSpanTermExtractor. extractUnknownQuery(Query query, Map<String,WeightedSpanTerm> terms)protected voidWeightedSpanTermExtractor. extractWeightedTerms(Map<String,WeightedSpanTerm> terms, Query query)Fills aMapwith <@link WeightedSpanTerm>s using the terms from the suppliedQuery.static WeightedTerm[]QueryTermExtractor. getIdfWeightedTerms(Query query, IndexReader reader, String fieldName)Extracts all terms texts of a given Query into an array of WeightedTermsstatic WeightedTerm[]QueryTermExtractor. getTerms(Query query)Extracts all terms texts of a given Query into an array of WeightedTermsstatic WeightedTerm[]QueryTermExtractor. getTerms(Query query, boolean prohibited)Extracts all terms texts of a given Query into an array of WeightedTermsstatic WeightedTerm[]QueryTermExtractor. getTerms(Query query, boolean prohibited, String fieldName)Extracts all terms texts of a given Query into an array of WeightedTermsMap<String,WeightedSpanTerm>WeightedSpanTermExtractor. getWeightedSpanTerms(Query query, TokenStream tokenStream)Creates a Map ofWeightedSpanTermsfrom the givenQueryandTokenStream.Map<String,WeightedSpanTerm>WeightedSpanTermExtractor. getWeightedSpanTerms(Query query, TokenStream tokenStream, String fieldName)Creates a Map ofWeightedSpanTermsfrom the givenQueryandTokenStream.Map<String,WeightedSpanTerm>WeightedSpanTermExtractor. getWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, String fieldName, IndexReader reader)Creates a Map ofWeightedSpanTermsfrom the givenQueryandTokenStream.Constructors in org.apache.lucene.search.highlight with parameters of type Query Constructor Description QueryScorer(Query query)QueryScorer(Query query, String field)QueryScorer(Query query, String field, String defaultField)QueryScorer(Query query, IndexReader reader, String field)QueryScorer(Query query, IndexReader reader, String field, String defaultField)QueryTermScorer(Query query)QueryTermScorer(Query query, String fieldName)QueryTermScorer(Query query, IndexReader reader, String fieldName) -
Uses of Query in org.apache.lucene.search.join
Subclasses of Query in org.apache.lucene.search.join Modifier and Type Class Description classToChildBlockJoinQueryJust likeToParentBlockJoinQuery, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.classToParentBlockJoinQueryThis query requires that you index children and parent docs as a single block, using theIndexWriter.addDocuments(java.util.Collection<org.apache.lucene.document.Document>)orIndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection<org.apache.lucene.document.Document>)API.Methods in org.apache.lucene.search.join that return Query Modifier and Type Method Description static QueryJoinUtil. createJoinQuery(String fromField, String toField, Query fromQuery, IndexSearcher fromSearcher)Method for query time joining.QueryToChildBlockJoinQuery. rewrite(IndexReader reader)QueryToParentBlockJoinQuery. rewrite(IndexReader reader)Methods in org.apache.lucene.search.join with parameters of type Query Modifier and Type Method Description static QueryJoinUtil. createJoinQuery(String fromField, String toField, Query fromQuery, IndexSearcher fromSearcher)Method for query time joining.Constructors in org.apache.lucene.search.join with parameters of type Query Constructor Description ToChildBlockJoinQuery(Query parentQuery, Filter parentsFilter, boolean doScores)ToParentBlockJoinQuery(Query childQuery, Filter parentsFilter, ToParentBlockJoinQuery.ScoreMode scoreMode)Create a ToParentBlockJoinQuery. -
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.regex
Subclasses of Query in org.apache.lucene.search.regex Modifier and Type Class Description classRegexQueryImplements the regular expression term search query.classSpanRegexQueryDeprecated.Usenew SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery())instead. -
Uses of Query in org.apache.lucene.search.similar
Subclasses of Query in org.apache.lucene.search.similar Modifier and Type Class Description classMoreLikeThisQueryA simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg in custom QueryParser extensions.Methods in org.apache.lucene.search.similar that return Query Modifier and Type Method Description static QuerySimilarityQueries. formSimilarQuery(String body, Analyzer a, String field, Set<?> stop)Simple similarity query generators.QueryMoreLikeThis. like(int docNum)Return a query that will return docs like the passed lucene document ID.QueryMoreLikeThis. like(File f)Deprecated.useMoreLikeThis.like(Reader, String)insteadQueryMoreLikeThis. like(InputStream is)Deprecated.useMoreLikeThis.like(Reader, String)insteadQueryMoreLikeThis. like(Reader r)Deprecated.useMoreLikeThis.like(Reader, String)insteadQueryMoreLikeThis. like(Reader r, String fieldName)Return a query that will return docs like the passed Reader.QueryMoreLikeThis. like(URL u)Deprecated.useMoreLikeThis.like(Reader, String)insteadQueryMoreLikeThisQuery. rewrite(IndexReader reader) -
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.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()QueryFieldMaskingSpanQuery. 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.search.vectorhighlight
Methods in org.apache.lucene.search.vectorhighlight with parameters of type Query Modifier and Type Method Description FieldQueryFastVectorHighlighter. getFieldQuery(Query query)create aFieldQueryobject.FieldQueryFastVectorHighlighter. getFieldQuery(Query query, IndexReader reader)create aFieldQueryobject. -
Uses of Query in org.apache.lucene.spatial.tier
Methods in org.apache.lucene.spatial.tier that return Query Modifier and Type Method Description QueryDistanceQueryBuilder. getQuery(Query query)Deprecated.Methods in org.apache.lucene.spatial.tier with parameters of type Query Modifier and Type Method Description FilterDistanceQueryBuilder. getFilter(Query query)Deprecated.QueryDistanceQueryBuilder. getQuery(Query query)Deprecated. -
Uses of Query in org.apache.lucene.xmlparser
Methods in org.apache.lucene.xmlparser that return Query Modifier and Type Method Description QueryCoreParser. getQuery(Element e)QueryQueryBuilder. getQuery(Element e)QueryQueryBuilderFactory. getQuery(Element n)QueryCoreParser. parse(InputStream xmlStream)Parses the given stream as XML file and returns aQuery. -
Uses of Query in org.apache.lucene.xmlparser.builders
Methods in org.apache.lucene.xmlparser.builders that return Query Modifier and Type Method Description QueryBooleanQueryBuilder. getQuery(Element e)QueryBoostingQueryBuilder. getQuery(Element e)QueryConstantScoreQueryBuilder. getQuery(Element e)QueryFilteredQueryBuilder. getQuery(Element e)QueryFuzzyLikeThisQueryBuilder. getQuery(Element e)QueryLikeThisQueryBuilder. getQuery(Element e)QueryMatchAllDocsQueryBuilder. getQuery(Element e)QueryNumericRangeQueryBuilder. getQuery(Element e)QuerySpanBuilderBase. getQuery(Element e)QuerySpanQueryBuilderFactory. getQuery(Element e)QueryTermQueryBuilder. getQuery(Element e)QueryTermsQueryBuilder. getQuery(Element e)QueryUserInputQueryBuilder. getQuery(Element e)
-