Package org.apache.lucene.search
Class ConjunctionUtils
java.lang.Object
org.apache.lucene.search.ConjunctionUtils
Helper methods for building conjunction iterators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddIterator(DocIdSetIterator disi, List<DocIdSetIterator> allIterators, List<TwoPhaseIterator> twoPhaseIterators) Given a DocIdSetIterator, find any sub-iterators or two-phase iterators and add them to the provided DocIdSetIterator and TwoPhaseIterator listsstatic voidaddTwoPhaseIterator(TwoPhaseIterator twoPhaseIter, List<DocIdSetIterator> allIterators, List<TwoPhaseIterator> twoPhaseIterators) Given a two-phase iterator, find any sub-iterators and add them to the provided DocIdSetIterator and TwoPhaseIterator listsstatic DocIdSetIteratorcreateConjunction(List<DocIdSetIterator> allIterators, List<TwoPhaseIterator> twoPhaseIterators) Create a conjunction over the provided set of DocIdSetIterators and TwoPhaseIterators, using two-phase iterator where possible.static DocIdSetIteratorintersectIterators(List<? extends DocIdSetIterator> iterators) Create a conjunction over the provided DocIdSetIterators.static DocIdSetIteratorintersectScorers(Collection<Scorer> scorers) Create a conjunction over the providedScorers.
-
Constructor Details
-
ConjunctionUtils
public ConjunctionUtils()
-
-
Method Details
-
intersectScorers
Create a conjunction over the providedScorers. Note that the returnedDocIdSetIteratormight leverage two-phase iteration in which case it is possible to retrieve theTwoPhaseIteratorusingTwoPhaseIterator.unwrap(org.apache.lucene.search.DocIdSetIterator). -
intersectIterators
Create a conjunction over the provided DocIdSetIterators. Note that the returnedDocIdSetIteratormight leverage two-phase iteration in which case it is possible to retrieve theTwoPhaseIteratorusingTwoPhaseIterator.unwrap(org.apache.lucene.search.DocIdSetIterator). -
createConjunction
public static DocIdSetIterator createConjunction(List<DocIdSetIterator> allIterators, List<TwoPhaseIterator> twoPhaseIterators) Create a conjunction over the provided set of DocIdSetIterators and TwoPhaseIterators, using two-phase iterator where possible. Note that the returnedDocIdSetIteratormight leverage two-phase iteration in which case it is possible to retrieve theTwoPhaseIteratorusingTwoPhaseIterator.unwrap(org.apache.lucene.search.DocIdSetIterator).- Parameters:
allIterators- a list of DocIdSetIterators to combinetwoPhaseIterators- a list of TwoPhaseIterators to combine
-
addTwoPhaseIterator
public static void addTwoPhaseIterator(TwoPhaseIterator twoPhaseIter, List<DocIdSetIterator> allIterators, List<TwoPhaseIterator> twoPhaseIterators) Given a two-phase iterator, find any sub-iterators and add them to the provided DocIdSetIterator and TwoPhaseIterator lists -
addIterator
public static void addIterator(DocIdSetIterator disi, List<DocIdSetIterator> allIterators, List<TwoPhaseIterator> twoPhaseIterators) Given a DocIdSetIterator, find any sub-iterators or two-phase iterators and add them to the provided DocIdSetIterator and TwoPhaseIterator lists
-