Package org.elasticsearch.search.slice
Class TermsSliceQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.elasticsearch.search.slice.SliceQuery
-
- org.elasticsearch.search.slice.TermsSliceQuery
-
public final class TermsSliceQuery extends SliceQuery
ASliceQuerythat uses the terms dictionary of a field to do the slicing. NOTE: The cost of this filter is O(N*M) where N is the number of unique terms in the dictionary and M is the average number of documents per term. For each segment this filter enumerates the terms dictionary, computes the hash code for each term and fills a bit set with the documents of all terms whose hash code matches the predicate. NOTE: Documents with no value for that field are ignored.
-
-
Field Summary
Fields Modifier and Type Field Description static intSEED
-
Constructor Summary
Constructors Constructor Description TermsSliceQuery(String field, int id, int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)Expert: Constructs an appropriate Weight implementation for this query.-
Methods inherited from class org.elasticsearch.search.slice.SliceQuery
contains, equals, getField, getId, getMax, hashCode, toString
-
-
-
-
Field Detail
-
SEED
public static final int SEED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TermsSliceQuery
public TermsSliceQuery(String field, int id, int max)
-
-
Method Detail
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
Description copied from class:QueryExpert: Constructs an appropriate Weight implementation for this query.Only implemented by primitive queries, which re-write to themselves.
- Overrides:
createWeightin classQueryscoreMode- How the produced scorers will be consumed.boost- The boost that is propagated by the parent queries.- Throws:
IOException
-
-