@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { BytesRef maxTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMax(); if (maxTerm == null || term.compareTo(maxTerm) > 0) { maxTerm = term; } } return maxTerm; }
bb = terms.getMax(); if (bb != null) { assert bb.isValid();
@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { return delegateTerms.getMax(); } }
@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { if (maxTerm == null) { // Older index that didn't store min/maxTerm return super.getMax(); } else { return maxTerm; } }
@Override public BytesRef getMax() throws IOException { BytesRef maxTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMax(); if (maxTerm == null || term.compareTo(maxTerm) > 0) { maxTerm = term; } } return maxTerm; }
@Override public BytesRef getMax() throws IOException { BytesRef maxTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMax(); if (maxTerm == null || term.compareTo(maxTerm) > 0) { maxTerm = term; } } return maxTerm; }
@Override public BytesRef getMax() throws IOException { BytesRef maxTerm = null; for(Terms terms : subs) { BytesRef term = terms.getMax(); if (maxTerm == null || term.compareTo(maxTerm) > 0) { maxTerm = term; } } return maxTerm; }
/** * Returns the maximum long value indexed into this * numeric field or null if no terms exist. */ public static Long getMaxLong(Terms terms) throws IOException { BytesRef max = longTerms(terms).getMax(); return (max != null) ? NumericUtils.prefixCodedToLong(max) : null; }
/** * Returns the maximum int value indexed into this * numeric field or null if no terms exist. */ public static Integer getMaxInt(Terms terms) throws IOException { BytesRef max = intTerms(terms).getMax(); return (max != null) ? NumericUtils.prefixCodedToInt(max) : null; }
/** * Returns the maximum int value indexed into this * numeric field or null if no terms exist. */ public static Integer getMaxInt(Terms terms) throws IOException { BytesRef max = intTerms(terms).getMax(); return (max != null) ? NumericUtils.prefixCodedToInt(max) : null; }
/** * Returns the maximum long value indexed into this * numeric field or null if no terms exist. */ public static Long getMaxLong(Terms terms) throws IOException { BytesRef max = longTerms(terms).getMax(); return (max != null) ? NumericUtils.prefixCodedToLong(max) : 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(); }