public class PagedBytesIndexFieldData.PagedBytesEstimator extends java.lang.Object implements AbstractIndexFieldData.PerValueEstimator
Modifier and Type | Method and Description |
---|---|
void |
adjustForNoTerms(long actualUsed)
Adjust the breaker when no terms were actually loaded, but the field
data takes up space regardless.
|
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() |
public long bytesPerValue(org.apache.lucene.util.BytesRef term)
bytesPerValue
in interface AbstractIndexFieldData.PerValueEstimator
public long estimateStringFieldData()
public org.apache.lucene.index.TermsEnum beforeLoad(org.apache.lucene.index.Terms terms) throws java.io.IOException
beforeLoad
in interface AbstractIndexFieldData.PerValueEstimator
terms
- terms to be estimatedjava.io.IOException
public void afterLoad(org.apache.lucene.index.TermsEnum termsEnum, long actualUsed)
afterLoad
in interface AbstractIndexFieldData.PerValueEstimator
termsEnum
- terms that were loadedactualUsed
- actual field data memory usagepublic void adjustForNoTerms(long actualUsed)
actualUsed
- bytes actually used