Package org.elasticsearch.index.query
Class SourceConfirmedTextQuery
java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.index.query.SourceConfirmedTextQuery
public final class SourceConfirmedTextQuery
extends org.apache.lucene.search.Query
A variant of
TermQuery, PhraseQuery, MultiPhraseQuery
and span queries that uses postings for its approximation, but falls back to
stored fields or _source whenever term frequencies or positions are needed.
This query matches and scores the same way as the wrapped query.-
Constructor Summary
ConstructorsConstructorDescriptionSourceConfirmedTextQuery(org.apache.lucene.search.Query in, Function<LeafReaderContext, CheckedIntFunction<List<Object>, IOException>> valueFetcherProvider, org.apache.lucene.analysis.Analyzer indexAnalyzer) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.lucene.search.Queryapproximate(org.apache.lucene.search.Query query) Create an approximation for the given query.org.apache.lucene.search.WeightcreateWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost) booleanorg.apache.lucene.search.QuerygetQuery()inthashCode()org.apache.lucene.search.Queryrewrite(IndexReader reader) Methods inherited from class org.apache.lucene.search.Query
classHash, sameClassAs, toString, visit
-
Constructor Details
-
SourceConfirmedTextQuery
public SourceConfirmedTextQuery(org.apache.lucene.search.Query in, Function<LeafReaderContext, CheckedIntFunction<List<Object>, IOException>> valueFetcherProvider, org.apache.lucene.analysis.Analyzer indexAnalyzer)
-
-
Method Details
-
approximate
public static org.apache.lucene.search.Query approximate(org.apache.lucene.search.Query query) Create an approximation for the given query. The returned approximation should match a superset of the matches of the provided query. -
getQuery
public org.apache.lucene.search.Query getQuery() -
toString
- Specified by:
toStringin classorg.apache.lucene.search.Query
-
equals
- Specified by:
equalsin classorg.apache.lucene.search.Query
-
hashCode
public int hashCode()- Specified by:
hashCodein classorg.apache.lucene.search.Query
-
rewrite
- Overrides:
rewritein classorg.apache.lucene.search.Query- Throws:
IOException
-
createWeight
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.IndexSearcher searcher, org.apache.lucene.search.ScoreMode scoreMode, float boost) throws IOException - Overrides:
createWeightin classorg.apache.lucene.search.Query- Throws:
IOException
-