Class PagedBytesIndexFieldData.PagedBytesEstimator

    • Method Summary

      Modifier and Type Method Description
      void afterLoad​(org.apache.lucene.index.TermsEnum termsEnum, long actualUsed)
      Adjust the circuit breaker now that terms have been loaded, getting the actual used either from the parameter (if estimation worked for the entire set), or from the TermsEnum if it has been wrapped in a RamAccountingTermsEnum.
      org.apache.lucene.index.TermsEnum beforeLoad​(org.apache.lucene.index.Terms terms)
      Determine whether the BlockTreeTermsReader.FieldReader can be used for estimating the field data, adding the estimate to the circuit breaker if it can, otherwise wrapping the terms in a RamAccountingTermsEnum to be estimated on a per-term basis.
      long bytesPerValue​(org.apache.lucene.util.BytesRef term)  
      long estimateStringFieldData()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • estimateStringFieldData

        public long estimateStringFieldData()
        Returns:
        the estimate for loading the entire term set into field data, or 0 if unavailable
      • beforeLoad

        public org.apache.lucene.index.TermsEnum beforeLoad​(org.apache.lucene.index.Terms terms)
                                                     throws java.io.IOException
        Determine whether the BlockTreeTermsReader.FieldReader can be used for estimating the field data, adding the estimate to the circuit breaker if it can, otherwise wrapping the terms in a RamAccountingTermsEnum to be estimated on a per-term basis.
        Specified by:
        beforeLoad in interface AbstractIndexFieldData.PerValueEstimator
        Parameters:
        terms - terms to be estimated
        Returns:
        A possibly wrapped TermsEnum for the terms
        Throws:
        java.io.IOException
      • afterLoad

        public void afterLoad​(org.apache.lucene.index.TermsEnum termsEnum,
                              long actualUsed)
        Adjust the circuit breaker now that terms have been loaded, getting the actual used either from the parameter (if estimation worked for the entire set), or from the TermsEnum if it has been wrapped in a RamAccountingTermsEnum.
        Specified by:
        afterLoad in interface AbstractIndexFieldData.PerValueEstimator
        Parameters:
        termsEnum - terms that were loaded
        actualUsed - actual field data memory usage