de.pangaea.metadataportal.search
Class LuceneCollector
java.lang.Object
org.apache.lucene.search.Collector
de.pangaea.metadataportal.search.LuceneCollector
public final class LuceneCollector
- extends org.apache.lucene.search.Collector
Internal implementation of a Lucene Collector for the collector API of SearchService.
- Author:
- Uwe Schindler
|
Field Summary |
protected int[] |
docIds
|
protected float[] |
scores
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
docIds
protected int[] docIds
scores
protected float[] scores
LuceneCollector
protected LuceneCollector(int bufferSize,
SearchResultCollector coll,
Config config,
org.apache.lucene.document.FieldSelector fields)
- Creates an instance using the specified buffer size wrapping the
SearchResultCollector.
flushBuffer
protected void flushBuffer()
throws IOException
- Flushes the internal buffer by calling
SearchResultCollector.collect(de.pangaea.metadataportal.search.SearchResultItem) with
the loaded document instance for each buffer entry.
- Throws:
IOException
setScorer
public final void setScorer(org.apache.lucene.search.Scorer scorer)
- Specified by:
setScorer in class org.apache.lucene.search.Collector
setNextReader
public final void setNextReader(org.apache.lucene.index.IndexReader reader,
int docBase)
throws IOException
- Specified by:
setNextReader in class org.apache.lucene.search.Collector
- Throws:
IOException
collect
public final void collect(int doc)
throws IOException
- Called by Lucene to collect search result items.
- Specified by:
collect in class org.apache.lucene.search.Collector
- Throws:
IOException
acceptsDocsOutOfOrder
public boolean acceptsDocsOutOfOrder()
- Specified by:
acceptsDocsOutOfOrder in class org.apache.lucene.search.Collector
Copyright ©2007-2009 panFMP Developers c/o Uwe Schindler