@Override public int advance(int target) throws IOException { return in.advance(target); }
@Override public int advance(int target) throws IOException { return in.advance(target); }
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return Double.longBitsToDouble(values.longValue()); } else { return missingValue; } } };
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return Float.intBitsToFloat((int) values.longValue()); } else { return missingValue; } } };
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return (int) values.longValue(); } else { return missingValue; } } };
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return values.longValue(); } else { return missingValue; } } };
@Override public int advance(int targetDocID) throws IOException { if (targetDocID <= docID) { throw new IllegalArgumentException("can only advance beyond current document: on docID=" + docID + " but targetDocID=" + targetDocID); } int readerIndex = ReaderUtil.subIndex(targetDocID, leaves); if (readerIndex >= nextLeaf) { if (readerIndex == leaves.size()) { currentValues = null; docID = NO_MORE_DOCS; return docID; } currentLeaf = leaves.get(readerIndex); currentValues = currentLeaf.reader().getNormValues(field); if (currentValues == null) { return nextDoc(); } nextLeaf = readerIndex+1; } int newDocID = currentValues.advance(targetDocID - currentLeaf.docBase); if (newDocID == NO_MORE_DOCS) { currentValues = null; return nextDoc(); } else { docID = currentLeaf.docBase + newDocID; return docID; } }
@Override public int advance(int targetDocID) throws IOException { if (targetDocID <= docID) { throw new IllegalArgumentException("can only advance beyond current document: on docID=" + docID + " but targetDocID=" + targetDocID); } int readerIndex = ReaderUtil.subIndex(targetDocID, leaves); if (readerIndex >= nextLeaf) { if (readerIndex == leaves.size()) { currentValues = null; docID = NO_MORE_DOCS; return docID; } currentLeaf = leaves.get(readerIndex); currentValues = currentLeaf.reader().getNumericDocValues(field); nextLeaf = readerIndex+1; if (currentValues == null) { return nextDoc(); } } int newDocID = currentValues.advance(targetDocID - currentLeaf.docBase); if (newDocID == NO_MORE_DOCS) { currentValues = null; return nextDoc(); } else { docID = currentLeaf.docBase + newDocID; return docID; } }
@Override public int advance(int target) throws IOException { return in.advance(target); }
@Override public int advance(int target) throws IOException { return in.advance(target); }
private float getValueForDoc(int doc) throws IOException { if (doc < lastDocID) { throw new IllegalArgumentException("docs were sent out-of-order: lastDocID=" + lastDocID + " vs docID=" + doc); } lastDocID = doc; int curDocID = arr.docID(); if (doc > curDocID) { curDocID = arr.advance(doc); } if (doc == curDocID) { return Float.intBitsToFloat((int)arr.longValue()); } else { return 0f; } }
private long getValueForDoc(int doc) throws IOException { if (doc < lastDocID) { throw new IllegalArgumentException("docs were sent out-of-order: lastDocID=" + lastDocID + " vs docID=" + doc); } lastDocID = doc; int curDocID = arr.docID(); if (doc > curDocID) { curDocID = arr.advance(doc); } if (doc == curDocID) { return arr.longValue(); } else { return 0; } }
private double getValueForDoc(int doc) throws IOException { if (doc < lastDocID) { throw new IllegalArgumentException("docs were sent out-of-order: lastDocID=" + lastDocID + " vs docID=" + doc); } lastDocID = doc; int curDocID = values.docID(); if (doc > curDocID) { curDocID = values.advance(doc); } if (doc == curDocID) { return Double.longBitsToDouble(values.longValue()); } else { return 0.0; } }
private int getValueForDoc(int doc) throws IOException { if (doc < lastDocID) { throw new AssertionError("docs were sent out-of-order: lastDocID=" + lastDocID + " vs doc=" + doc); } lastDocID = doc; int curDocID = arr.docID(); if (doc > curDocID) { curDocID = arr.advance(doc); } if (doc == curDocID) { return (int) arr.longValue(); } else { return 0; } }
private int getValueForDoc(int doc) throws IOException { if (doc < lastDocID) { throw new IllegalArgumentException("docs were sent out-of-order: lastDocID=" + lastDocID + " vs docID=" + doc); } lastDocID = doc; int curDocID = arr.docID(); if (doc > curDocID) { curDocID = arr.advance(doc); } if (doc == curDocID) { return (int) arr.longValue(); } else { return 0; } }
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return Float.intBitsToFloat((int) values.longValue()); } else { return missingValue; } } };
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return Double.longBitsToDouble(values.longValue()); } else { return missingValue; } } };
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return (int) values.longValue(); } else { return missingValue; } } };
@Override public Comparable getComparable(int docID) throws IOException { assert docsInOrder(docID); int readerDocID = values.docID(); if (readerDocID < docID) { readerDocID = values.advance(docID); } if (readerDocID == docID) { return values.longValue(); } else { return missingValue; } } };
@Override public int advance(int targetDocID) throws IOException { if (targetDocID <= docID) { throw new IllegalArgumentException("can only advance beyond current document: on docID=" + docID + " but targetDocID=" + targetDocID); } int readerIndex = ReaderUtil.subIndex(targetDocID, leaves); if (readerIndex >= nextLeaf) { if (readerIndex == leaves.size()) { currentValues = null; docID = NO_MORE_DOCS; return docID; } currentLeaf = leaves.get(readerIndex); currentValues = currentLeaf.reader().getNormValues(field); if (currentValues == null) { return nextDoc(); } nextLeaf = readerIndex+1; } int newDocID = currentValues.advance(targetDocID - currentLeaf.docBase); if (newDocID == NO_MORE_DOCS) { currentValues = null; return nextDoc(); } else { docID = currentLeaf.docBase + newDocID; return docID; } }