@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { BytesRef minTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMin(); if (minTerm == null || term.compareTo(minTerm) < 0) { minTerm = term; } } return minTerm; }
minTerm = null; } else { BytesRef bb = terms.getMin(); if (bb != null) { assert bb.isValid();
@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { if (minTerm == null) { // Older index that didn't store min/maxTerm return super.getMin(); } else { return minTerm; } }
@Override public BytesRef getMin() throws IOException { return delegateTerms.getMin(); }
@Override public BytesRef getMin() throws IOException { BytesRef minTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMin(); if (minTerm == null || term.compareTo(minTerm) < 0) { minTerm = term; } } return minTerm; }
@Override public BytesRef getMin() throws IOException { BytesRef minTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMin(); if (minTerm == null || term.compareTo(minTerm) < 0) { minTerm = term; } } return minTerm; }
/** * Returns the minimum long value indexed into this * numeric field or null if no terms exist. */ public static Long getMinLong(Terms terms) throws IOException { // All shift=0 terms are sorted first, so we don't need // to filter the incoming terms; we can just get the // min: BytesRef min = terms.getMin(); return (min != null) ? NumericUtils.prefixCodedToLong(min) : null; }
@Override public BytesRef getMin() throws IOException { BytesRef minTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMin(); if (minTerm == null || term.compareTo(minTerm) < 0) { minTerm = term; } } return minTerm; }
/** * Returns the minimum int value indexed into this * numeric field or null if no terms exist. */ public static Integer getMinInt(Terms terms) throws IOException { // All shift=0 terms are sorted first, so we don't need // to filter the incoming terms; we can just get the // min: BytesRef min = terms.getMin(); return (min != null) ? NumericUtils.prefixCodedToInt(min) : null; }
/** * Returns the minimum long value indexed into this * numeric field or null if no terms exist. */ public static Long getMinLong(Terms terms) throws IOException { // All shift=0 terms are sorted first, so we don't need // to filter the incoming terms; we can just get the // min: BytesRef min = terms.getMin(); return (min != null) ? NumericUtils.prefixCodedToLong(min) : null; }
/** * Returns the minimum int value indexed into this * numeric field or null if no terms exist. */ public static Integer getMinInt(Terms terms) throws IOException { // All shift=0 terms are sorted first, so we don't need // to filter the incoming terms; we can just get the // min: BytesRef min = terms.getMin(); return (min != null) ? NumericUtils.prefixCodedToInt(min) : null; }
/** * @return a {@link FieldStats} instance that maps to the type of this field based on the provided {@link Terms} instance. */ public FieldStats stats(Terms terms, int maxDoc) throws IOException { return new FieldStats.Text( maxDoc, terms.getDocCount(), terms.getSumDocFreq(), terms.getSumTotalTermFreq(), terms.getMin(), terms.getMax() ); }
FieldStats(final Terms terms, final FieldTypeInterface fieldType) throws IOException { docCount = terms.getDocCount(); sumDocFreq = terms.getSumDocFreq(); sumTotalTermFreq = terms.getSumTotalTermFreq(); if (fieldType != null) { min = fieldType.toTerm(terms.getMin()); max = fieldType.toTerm(terms.getMax()); } else { min = null; max = null; } numberOfTerms = terms.size(); }