Package | Description |
---|---|
org.apache.lucene.classification |
Uses already seen data (the indexed documents) to classify new documents.
|
org.apache.lucene.facet |
faceted search
|
org.apache.lucene.index |
Misc index tools and index support.
|
org.apache.lucene.index.memory |
High-performance single-document main memory Apache Lucene fulltext search index.
|
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.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.sandbox.queries.regex |
Regular expression Query.
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.grouping |
This module enables search result grouping with Lucene, where hits
with the same value in the specified single-valued group field are
grouped together.
|
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.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.vectorhighlight |
This is an another highlighter implementation.
|
org.apache.lucene.util |
Some utility classes.
|
Modifier and Type | Method and Description |
---|---|
void |
SimpleNaiveBayesClassifier.train(AtomicReader atomicReader,
String[] textFieldNames,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
void |
KNearestNeighborClassifier.train(AtomicReader atomicReader,
String[] textFieldNames,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
void |
Classifier.train(AtomicReader atomicReader,
String[] textFieldNames,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
void |
SimpleNaiveBayesClassifier.train(AtomicReader atomicReader,
String textFieldName,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
void |
KNearestNeighborClassifier.train(AtomicReader atomicReader,
String textFieldName,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
void |
Classifier.train(AtomicReader atomicReader,
String textFieldName,
String classFieldName,
Analyzer analyzer,
Query query)
Train the classifier using the underlying Lucene index
|
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.
|
static TopDocs |
FacetsCollector.search(IndexSearcher searcher,
Query q,
Filter filter,
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,
Filter filter,
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,
Filter filter,
int n,
Sort sort,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
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 TopDocs |
FacetsCollector.searchAfter(IndexSearcher searcher,
ScoreDoc after,
Query q,
Filter filter,
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,
Filter filter,
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,
Filter filter,
int n,
Sort sort,
Collector fc)
Utility method, to search and also collect all hits
into the provided
Collector . |
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 . |
Constructor and Description |
---|
DrillDownQuery(FacetsConfig config,
Query baseQuery)
Creates a new
DrillDownQuery over the given base query. |
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 |
IndexWriter.deleteDocuments(Query query)
Deletes the document(s) matching the provided query.
|
long |
TrackingIndexWriter.deleteDocuments(Query q)
Calls
IndexWriter.deleteDocuments(Query) and
returns the generation that reflects this change. |
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 | 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.AtomicReaderContext) . |
Modifier and Type | Method and Description |
---|---|
protected Query |
CommonTermsQuery.buildQuery(int maxDoc,
TermContext[] contextArray,
Term[] queryTerms) |
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 |
BoostingQuery.rewrite(IndexReader reader) |
Query |
CommonTermsQuery.rewrite(IndexReader reader) |
Query |
CustomScoreQuery.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.
|
Modifier and Type | Method and Description |
---|---|
Query |
FunctionQuery.FunctionWeight.getQuery() |
Query |
BoostedQuery.getQuery() |
Query |
FunctionQuery.rewrite(IndexReader reader) |
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(Reader r,
String fieldName)
Return a query that will return docs like the passed Reader.
|
Query |
MoreLikeThisQuery.rewrite(IndexReader reader) |
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.getBooleanQuery(List<BooleanClause> clauses,
boolean disableCoord)
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 |
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(Version matchVersion,
String[] queries,
String[] fields,
Analyzer analyzer)
Parses a query which searches on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(Version matchVersion,
String[] queries,
String[] fields,
BooleanClause.Occur[] flags,
Analyzer analyzer)
Parses a query, searching on the fields specified.
|
static Query |
MultiFieldQueryParser.parse(Version matchVersion,
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) |
Query |
QueryParser.TopLevelQuery(String field) |
abstract Query |
QueryParserBase.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 |
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 |
StandardQueryTreeBuilder.build(QueryNode queryNode) |
Query |
ModifierQueryNodeBuilder.build(QueryNode queryNode) |
Query |
StandardQueryBuilder.build(QueryNode queryNode) |
Query |
BoostQueryNodeBuilder.build(QueryNode queryNode) |
Query |
GroupQueryNodeBuilder.build(QueryNode queryNode) |
Query |
SlopQueryNodeBuilder.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 (or null if empty)
|
protected Query |
SimpleQueryParser.simplify(BooleanQuery bq)
Helper to simplify boolean queries with 0 or 1 clause
|
Modifier and Type | Field and Description |
---|---|
static Query |
SrndQuery.theEmptyLcnQuery
An empty Lucene query
|
Modifier and Type | Method and Description |
---|---|
Query |
DistanceQuery.getSpanNearQuery(IndexReader reader,
String fieldName,
float boost,
BasicQueryFactory qf) |
Query |
SrndQuery.makeLuceneQueryField(String fieldName,
BasicQueryFactory qf) |
Query |
OrQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
NotQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
FieldsQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
SimpleTerm.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
abstract Query |
SrndQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
AndQuery.makeLuceneQueryFieldNoBoost(String fieldName,
BasicQueryFactory qf) |
Query |
DistanceQuery.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 |
ConstantScoreQueryBuilder.getQuery(Element e) |
Query |
BoostingQueryBuilder.getQuery(Element e) |
Query |
MatchAllDocsQueryBuilder.getQuery(Element e) |
Query |
NumericRangeQueryBuilder.getQuery(Element e) |
Query |
SpanBuilderBase.getQuery(Element e) |
Query |
SpanQueryBuilderFactory.getQuery(Element e) |
Query |
FilteredQueryBuilder.getQuery(Element e) |
Query |
TermQueryBuilder.getQuery(Element e) |
Query |
TermsQueryBuilder.getQuery(Element e) |
Query |
DisjunctionMaxQueryBuilder.getQuery(Element e) |
Query |
UserInputQueryBuilder.getQuery(Element e) |
Query |
FuzzyLikeThisQueryBuilder.getQuery(Element e) |
Query |
BooleanQueryBuilder.getQuery(Element e) |
Query |
LikeThisQueryBuilder.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 |
SlowCollatedTermRangeQuery
Deprecated.
Index collation keys with CollationKeyAnalyzer or ICUCollationKeyAnalyzer instead.
This class will be removed in Lucene 5.0
|
class |
SlowFuzzyQuery
Deprecated.
Use
FuzzyQuery instead. |
Modifier and Type | Method and Description |
---|---|
Query |
FuzzyLikeThisQuery.rewrite(IndexReader reader) |
Modifier and Type | Class and Description |
---|---|
class |
RegexQuery
Implements the regular expression term search query.
|
Modifier and Type | Class and Description |
---|---|
class |
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.
|
Modifier and Type | Class and Description |
---|---|
class |
AutomatonQuery
A
Query that will match terms against a finite-state machine. |
class |
BooleanQuery
A Query that matches documents matching boolean combinations of other
queries, e.g.
|
class |
ConstantScoreQuery
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 |
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 |
FilteredQuery
A query that applies a filter to the results of another query.
|
class |
FuzzyQuery
Implements the fuzzy search query.
|
class |
MatchAllDocsQuery
A query that matches all documents.
|
class |
MultiPhraseQuery
MultiPhraseQuery is a generalized version of PhraseQuery, with an added
method
MultiPhraseQuery.add(Term[]) . |
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 |
NumericRangeQuery<T extends Number>
A
Query that matches numeric values within a
specified range. |
class |
PhraseQuery
A Query that matches documents containing a particular sequence of terms.
|
class |
PrefixQuery
A Query that matches documents containing terms with a specified prefix.
|
class |
RegexpQuery
A fast regular expression query based on the
org.apache.lucene.util.automaton package. |
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 |
ConstantScoreQuery.query |
Modifier and Type | Method and Description |
---|---|
Query |
Query.clone()
Returns a clone of this query.
|
Query |
DisjunctionMaxQuery.DisjunctionMaxWeight.getQuery()
Return our associated DisjunctionMaxQuery
|
Query |
ConstantScoreQuery.getQuery()
Returns the encapsulated query, returns
null if a filter is wrapped. |
Query |
ConstantScoreQuery.ConstantWeight.getQuery() |
Query |
QueryWrapperFilter.getQuery()
returns the inner Query
|
Query |
BooleanClause.getQuery() |
Query |
BooleanQuery.BooleanWeight.getQuery() |
abstract Query |
Weight.getQuery()
The query that this concerns.
|
Query |
FilteredQuery.getQuery()
Returns this FilteredQuery's (unfiltered) Query
|
Query |
Query.rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
Query |
DisjunctionMaxQuery.rewrite(IndexReader reader)
Optimize our representation and our subqueries representations
|
Query |
MultiPhraseQuery.rewrite(IndexReader reader) |
Query |
ConstantScoreQuery.rewrite(IndexReader reader) |
Query |
NGramPhraseQuery.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 |
FilteredQuery.rewrite(IndexReader reader)
Rewrites the query.
|
Query |
PhraseQuery.rewrite(IndexReader reader) |
Query |
FieldCacheRewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
abstract Query |
MultiTermQuery.RewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
DocTermOrdsRewriteMethod.rewrite(IndexReader reader,
MultiTermQuery query) |
Query |
IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
|
protected Query |
IndexSearcher.wrapFilter(Query query,
Filter filter) |
Modifier and Type | Method and Description |
---|---|
ArrayList<Query> |
DisjunctionMaxQuery.getDisjuncts() |
Iterator<Query> |
DisjunctionMaxQuery.iterator() |
Modifier and Type | Method and Description |
---|---|
void |
DisjunctionMaxQuery.add(Query query)
Add a subquery to this disjunction
|
void |
BooleanQuery.add(Query query,
BooleanClause.Occur occur)
Adds a clause to a boolean query.
|
Weight |
IndexSearcher.createNormalizedWeight(Query query)
Creates a normalized weight for a top-level
Query . |
Explanation |
IndexSearcher.explain(Query query,
int doc)
Returns an Explanation that describes how
doc scored against
query . |
static TopDocs |
QueryRescorer.rescore(IndexSearcher searcher,
TopDocs topDocs,
Query query,
double weight,
int topN)
Sugar API, calling {#rescore} using a simple linear
combination of firstPassScore + weight * secondPassScore
|
Query |
IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
|
void |
IndexSearcher.search(Query query,
Collector results)
Lower-level search API.
|
void |
IndexSearcher.search(Query query,
Filter filter,
Collector results)
Lower-level search API.
|
TopDocs |
IndexSearcher.search(Query query,
Filter filter,
int n)
Finds the top
n
hits for query , applying filter if non-null. |
TopFieldDocs |
IndexSearcher.search(Query query,
Filter filter,
int n,
Sort sort)
Search implementation with arbitrary sorting.
|
TopFieldDocs |
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.
|
TopDocs |
IndexSearcher.search(Query query,
int n)
Finds the top
n
hits for query . |
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort)
Search implementation with arbitrary sorting and no filter.
|
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
Filter filter,
int n)
Finds the top
n
hits for query , applying filter if non-null,
where all results are after a previous result (after ). |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
Filter filter,
int n,
Sort sort)
Finds the top
n
hits for query , applying filter if non-null,
where all results are after a previous result (after ). |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
Filter filter,
int n,
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. |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int n)
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 ). |
void |
BooleanClause.setQuery(Query query) |
protected Query |
IndexSearcher.wrapFilter(Query query,
Filter filter) |
Modifier and Type | Method and Description |
---|---|
void |
DisjunctionMaxQuery.add(Collection<Query> disjuncts)
Add a collection of disjuncts to this disjunction
via
Iterable<Query> |
Constructor and 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.
|
QueryRescorer(Query query)
Sole constructor, passing the 2nd pass query to
assign scores to the 1st pass hits.
|
QueryWrapperFilter(Query query)
Constructs a filter which only matches documents matching
query . |
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,
Filter filter,
Query query,
int groupOffset,
int groupLimit) |
protected TopGroups |
GroupingSearch.groupByFieldOrFunction(IndexSearcher searcher,
Filter filter,
Query query,
int groupOffset,
int groupLimit) |
<T> TopGroups<T> |
GroupingSearch.search(IndexSearcher searcher,
Filter filter,
Query query,
int groupOffset,
int groupLimit)
Executes a grouped search.
|
<T> TopGroups<T> |
GroupingSearch.search(IndexSearcher searcher,
Query query,
int groupOffset,
int groupLimit)
Executes a grouped search.
|
Modifier and Type | Method and Description |
---|---|
protected void |
WeightedSpanTermExtractor.extract(Query query,
Map<String,WeightedSpanTerm> terms)
Fills a
Map with <@link WeightedSpanTerm>s using the terms from the supplied Query . |
protected void |
WeightedSpanTermExtractor.extractUnknownQuery(Query query,
Map<String,WeightedSpanTerm> terms) |
protected void |
WeightedSpanTermExtractor.extractWeightedTerms(Map<String,WeightedSpanTerm> terms,
Query query)
Fills a
Map with <@link WeightedSpanTerm>s using the terms from the supplied Query . |
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,
TokenStream tokenStream)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
Map<String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTerms(Query query,
TokenStream tokenStream,
String fieldName)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
Map<String,WeightedSpanTerm> |
WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query,
TokenStream tokenStream,
String fieldName,
IndexReader reader)
Creates a Map of
WeightedSpanTerms from the given Query and TokenStream . |
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,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining.
|
Query |
ToParentBlockJoinQuery.rewrite(IndexReader reader) |
Query |
ToChildBlockJoinQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
static Query |
JoinUtil.createJoinQuery(String fromField,
boolean multipleValuesPerDocument,
String toField,
Query fromQuery,
IndexSearcher fromSearcher,
ScoreMode scoreMode)
Method for query time joining.
|
Constructor and Description |
---|
ToChildBlockJoinQuery(Query parentQuery,
Filter parentsFilter,
boolean doScores)
Create a ToChildBlockJoinQuery.
|
ToParentBlockJoinQuery(Query childQuery,
Filter parentsFilter,
ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.
|
Modifier and Type | Class and Description |
---|---|
class |
PayloadNearQuery
This class is very similar to
SpanNearQuery except that it factors
in the value of the payloads located at each of the positions where the
TermSpans occurs. |
class |
PayloadTermQuery
This class is very similar to
SpanTermQuery except that it factors
in the value of the payload located at each of the positions where the
Term occurs. |
Modifier and Type | Method and Description |
---|---|
Collection<byte[]> |
PayloadSpanUtil.getPayloadsForQuery(Query query)
Query should be rewritten for wild/fuzzy support.
|
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 |
FieldMaskingSpanQuery
Wrapper to allow
SpanQuery objects participate in composite
single-field SpanQueries by 'lying' about their search field. |
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 |
SpanNearPayloadCheckQuery
Only return those matches that have a specific payload at
the given position.
|
class |
SpanNearQuery
Matches spans which are near one another.
|
class |
SpanNotQuery
Removes matches which overlap with another SpanQuery or
within a x tokens before or y tokens after another SpanQuery.
|
class |
SpanOrQuery
Matches the union of its clauses.
|
class |
SpanPayloadCheckQuery
Only return those matches that have a specific payload at
the given position.
|
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 |
class |
SpanQuery
Base class for span-based queries.
|
class |
SpanTermQuery
Matches spans containing a term.
|
Modifier and Type | Method and Description |
---|---|
Query |
SpanWeight.getQuery() |
Query |
SpanMultiTermQueryWrapper.getWrappedQuery()
Returns the wrapped query
|
Query |
SpanNearQuery.rewrite(IndexReader reader) |
Query |
SpanNotQuery.rewrite(IndexReader reader) |
Query |
SpanPositionCheckQuery.rewrite(IndexReader reader) |
Query |
SpanMultiTermQueryWrapper.rewrite(IndexReader reader) |
Query |
SpanOrQuery.rewrite(IndexReader reader) |
Query |
FieldMaskingSpanQuery.rewrite(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
protected Query |
AnalyzingInfixSuggester.finishQuery(BooleanQuery 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 | Method and Description |
---|---|
protected Query |
FieldQuery.applyParentBoost(Query query,
Query parent)
Push parent's boost into a clone of query if parent has a non 1 boost.
|
Modifier and Type | Method and Description |
---|---|
protected Query |
FieldQuery.applyParentBoost(Query query,
Query parent)
Push parent's boost into a clone of query if parent has a non 1 boost.
|
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 |
---|---|
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.newTermQuery(Term term)
Builds a new TermQuery instance.
|
Copyright © 2000-2016 The Apache Software Foundation. All Rights Reserved.