Class DocCountProvider
java.lang.Object
org.elasticsearch.search.aggregations.bucket.DocCountProvider
public class DocCountProvider
extends java.lang.Object
An implementation of a doc_count provider that reads the value
of the _doc_count field in the document. If a document does not have a
_doc_count field the implementation will return 1 as the default value.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_VALUE -
Constructor Summary
Constructors Constructor Description DocCountProvider() -
Method Summary
Modifier and Type Method Description booleanalwaysOne()intgetDocCount(int doc)voidsetLeafReaderContext(org.apache.lucene.index.LeafReaderContext ctx)java.lang.StringtoString()
-
Field Details
-
DEFAULT_VALUE
public static final int DEFAULT_VALUE- See Also:
- Constant Field Values
-
-
Constructor Details
-
DocCountProvider
public DocCountProvider()
-
-
Method Details
-
getDocCount
public int getDocCount(int doc) throws java.io.IOException- Throws:
java.io.IOException
-
setLeafReaderContext
public void setLeafReaderContext(org.apache.lucene.index.LeafReaderContext ctx) throws java.io.IOException- Throws:
java.io.IOException
-
alwaysOne
public boolean alwaysOne() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-