Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Nested Class Summary
`static class` | `ExistsTupleCollector.CompletedException` Thrown when elapsed search time exceeds allowed search time.

Constructor Summary
`ExistsTupleCollector(LuceneQueryEngine.TupleCollector collector)` Create a ExistsTupleCollector wrapper over another `Collector`, where the wrapper stops after the first non-zero scored document.

Method Summary
`boolean` | `acceptsDocsOutOfOrder()`
`float` | `doCollect(int doc)`
`List<Object[]>` | `getTuples()` Get the tuples.
`void` | `setNextReader(org.apache.lucene.index.IndexReader reader, int docBase)`
`void` | `setScorer(org.apache.lucene.search.Scorer scorer)`

Methods inherited from class org.modeshape.jcr.query.lucene.LuceneQueryEngine.TupleCollector
`collect`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### 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`

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.