Class DocCountProvider

java.lang.Object
org.elasticsearch.search.aggregations.bucket.DocCountProvider

public class DocCountProvider extends 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 Details

  • Constructor Details

    • DocCountProvider

      public DocCountProvider()
  • Method Details

    • getDocCount

      public int getDocCount(int doc) throws IOException
      Throws:
      IOException
    • setLeafReaderContext

      public void setLeafReaderContext(org.apache.lucene.index.LeafReaderContext ctx) throws IOException
      Throws:
      IOException
    • alwaysOne

      public boolean alwaysOne()
    • toString

      public String toString()
      Overrides:
      toString in class Object