Package org.elasticsearch.search.slice
Class SliceQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.elasticsearch.search.slice.SliceQuery
-
- Direct Known Subclasses:
DocValuesSliceQuery,TermsSliceQuery
public abstract class SliceQuery extends Query
An abstractQuerythat defines an hash function to partition the documents in multiple slices.
-
-
Constructor Summary
Constructors Constructor Description SliceQuery(String field, int id, int max)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancontains(long value)booleanequals(Object o)Override and implement query instance equivalence properly in a subclass.StringgetField()intgetId()intgetMax()inthashCode()Override and implement query hash code properly in a subclass.StringtoString(String f)Prints a query to a string, withfieldassumed to be the default field and omitted.-
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, rewrite, sameClassAs, toString, visit
-
-
-
-
Constructor Detail
-
SliceQuery
public SliceQuery(String field, int id, int max)
- Parameters:
field- The name of the fieldid- The id of the slicemax- The maximum number of slices
-
-
Method Detail
-
contains
protected final boolean contains(long value)
-
getField
public String getField()
-
getId
public int getId()
-
getMax
public int getMax()
-
equals
public boolean equals(Object o)
Description copied from class:QueryOverride and implement query instance equivalence properly in a subclass. This is required so thatQueryCacheworks properly. Typically a query will be equal to another only if it's an instance of the same class and its document-filtering properties are identical that other instance. Utility methods are provided for certain repetitive code.- Specified by:
equalsin classQuery- See Also:
Query.sameClassAs(Object),Query.classHash()
-
hashCode
public int hashCode()
Description copied from class:QueryOverride and implement query hash code properly in a subclass. This is required so thatQueryCacheworks properly.- Specified by:
hashCodein classQuery- See Also:
Query.equals(Object)
-
-