Class DocCountProvider

org.elasticsearch.search.aggregations.bucket.DocCountProvider

public class DocCountProvider extends
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
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    getDocCount​(int doc)
     
    void
    setLeafReaderContext​(org.apache.lucene.index.LeafReaderContext ctx)
     
     

    Methods inherited from class java.lang.

    , , , , , , , , ,
  • Field Details

  • Constructor Details

    • DocCountProvider

      public DocCountProvider()
  • Method Details

    • getDocCount

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

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

      public boolean alwaysOne()
    • toString

      public  toString()
      Overrides:
       in class