org.modeshape.jcr.query.lucene.basic
Class ExistsTupleCollector
java.lang.Object
org.apache.lucene.search.Collector
org.modeshape.jcr.query.lucene.LuceneQueryEngine.TupleCollector
org.modeshape.jcr.query.lucene.basic.ExistsTupleCollector
public class ExistsTupleCollector
- extends LuceneQueryEngine.TupleCollector
A special TupleCollector implementation that will terminate when it comes across a second document with a non-zero score.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExistsTupleCollector
public ExistsTupleCollector(LuceneQueryEngine.TupleCollector collector)
- Create a ExistsTupleCollector wrapper over another
Collector
, where the wrapper stops after the first non-zero
scored document.
- Parameters:
collector
- the wrapped Collector
doCollect
public float doCollect(int doc)
throws IOException
- Specified by:
doCollect
in class LuceneQueryEngine.TupleCollector
- Throws:
IOException
getTuples
public List<Object[]> getTuples()
- Description copied from class:
LuceneQueryEngine.TupleCollector
- Get the tuples.
- Specified by:
getTuples
in class LuceneQueryEngine.TupleCollector
- Returns:
- the tuples; never null
setScorer
public void setScorer(org.apache.lucene.search.Scorer scorer)
throws IOException
- Specified by:
setScorer
in class org.apache.lucene.search.Collector
- Throws:
IOException
setNextReader
public void setNextReader(org.apache.lucene.index.IndexReader reader,
int docBase)
throws IOException
- Specified by:
setNextReader
in class org.apache.lucene.search.Collector
- Throws:
IOException
acceptsDocsOutOfOrder
public boolean acceptsDocsOutOfOrder()
- Specified by:
acceptsDocsOutOfOrder
in class org.apache.lucene.search.Collector
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.