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 int
DEFAULT_VALUE
-
Constructor Summary
Constructors Constructor Description DocCountProvider()
-
Method Summary
Modifier and Type Method Description boolean
alwaysOne()
int
getDocCount(int doc)
void
setLeafReaderContext(org.apache.lucene.index.LeafReaderContext ctx)
java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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:
toString
in classjava.lang.Object
-