public boolean next() throws IOException { return docIdSetIterator.next(); }
public boolean next() throws IOException { return docIdSetIterator.next(); }
/** * Perform an inplace XOR with the doc ids from a given DocIdSetIterator, * flipping all the bits for each such doc id. * These doc ids should be smaller than the maximum size passed to the * constructor. */ public void inPlaceXor(DocIdSetIterator disi) throws IOException { while (disi.next() && (disi.doc() < size())) { fastFlip(disi.doc()); } } }
/** * Perform an inplace OR with the doc ids from a given DocIdSetIterator, * setting the bit for each such doc id. * These doc ids should be smaller than the maximum size passed to the * constructor. */ public void inPlaceOr(DocIdSetIterator disi) throws IOException { while (disi.next() && (disi.doc() < size())) { fastSet(disi.doc()); } }
/** * Perform an inplace NOT with the doc ids from a given DocIdSetIterator, * clearing all the bits for each such doc id. * These doc ids should be smaller than the maximum size passed to the * constructor. */ public void inPlaceNot(DocIdSetIterator disi) throws IOException { while (disi.next() && (disi.doc() < size())) { fastClear(disi.doc()); } }
/** * Perform an inplace XOR with the doc ids from a given DocIdSetIterator, * flipping all the bits for each such doc id. * These doc ids should be smaller than the maximum size passed to the * constructor. */ public void inPlaceXor(DocIdSetIterator disi) throws IOException { while (disi.next() && (disi.doc() < size())) { fastFlip(disi.doc()); } } }
/** * Perform an inplace NOT with the doc ids from a given DocIdSetIterator, * clearing all the bits for each such doc id. * These doc ids should be smaller than the maximum size passed to the * constructor. */ public void inPlaceNot(DocIdSetIterator disi) throws IOException { while (disi.next() && (disi.doc() < size())) { fastClear(disi.doc()); } }
/** * Create a SortedVIntList. * @param docIdSetIterator An iterator providing document numbers as a set of integers. * This DocIdSetIterator is iterated completely when this constructor * is called and it must provide the integers in non * decreasing order. */ public SortedVIntList(DocIdSetIterator docIdSetIterator) throws IOException { SortedVIntListBuilder builder = new SortedVIntListBuilder(); while (docIdSetIterator.next()) { builder.addInt(docIdSetIterator.doc()); } builder.done(); }
/** * Perform an inplace OR with the doc ids from a given DocIdSetIterator, * setting the bit for each such doc id. * These doc ids should be smaller than the maximum size passed to the * constructor. */ public void inPlaceOr(DocIdSetIterator disi) throws IOException { while (disi.next() && (disi.doc() < size())) { fastSet(disi.doc()); } }
/** * Create a SortedVIntList. * @param docIdSetIterator An iterator providing document numbers as a set of integers. * This DocIdSetIterator is iterated completely when this constructor * is called and it must provide the integers in non * decreasing order. */ public SortedVIntList(DocIdSetIterator docIdSetIterator) throws IOException { SortedVIntListBuilder builder = new SortedVIntListBuilder(); while (docIdSetIterator.next()) { builder.addInt(docIdSetIterator.doc()); } builder.done(); }
public void search(Weight weight, Filter filter, final HitCollector results) throws IOException { Scorer scorer = weight.scorer(reader); if (scorer == null) return; if (filter == null) { scorer.score(results); return; } DocIdSetIterator filterDocIdIterator = filter.getDocIdSet(reader).iterator(); // CHECKME: use ConjunctionScorer here? boolean more = filterDocIdIterator.next() && scorer.skipTo(filterDocIdIterator.doc()); while (more) { int filterDocId = filterDocIdIterator.doc(); if (filterDocId > scorer.doc() && !scorer.skipTo(filterDocId)) { more = false; } else { int scorerDocId = scorer.doc(); if (scorerDocId == filterDocId) { // permitted by filter results.collect(scorerDocId, scorer.score()); more = filterDocIdIterator.next(); } else { more = filterDocIdIterator.skipTo(scorerDocId); } } } }
public void search(Weight weight, Filter filter, final HitCollector results) throws IOException { Scorer scorer = weight.scorer(reader); if (scorer == null) return; if (filter == null) { scorer.score(results); return; } DocIdSetIterator filterDocIdIterator = filter.getDocIdSet(reader).iterator(); // CHECKME: use ConjunctionScorer here? boolean more = filterDocIdIterator.next() && scorer.skipTo(filterDocIdIterator.doc()); while (more) { int filterDocId = filterDocIdIterator.doc(); if (filterDocId > scorer.doc() && !scorer.skipTo(filterDocId)) { more = false; } else { int scorerDocId = scorer.doc(); if (scorerDocId == filterDocId) { // permitted by filter results.collect(scorerDocId, scorer.score()); more = filterDocIdIterator.next(); } else { more = filterDocIdIterator.skipTo(scorerDocId); } } } }