Lucene++ - a full-featured, c++ search engine
API Documentation


Collector.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6 
7 #ifndef COLLECTOR_H
8 #define COLLECTOR_H
9 
10 #include "LuceneObject.h"
11 
12 namespace Lucene {
13 
100 class LPPAPI Collector : public LuceneObject {
101 public:
102  virtual ~Collector();
104 
105 public:
109  virtual void setScorer(const ScorerPtr& scorer) = 0;
110 
116  virtual void collect(int32_t doc) = 0;
117 
123  virtual void setNextReader(const IndexReaderPtr& reader, int32_t docBase) = 0;
124 
133  virtual bool acceptsDocsOutOfOrder() = 0;
134 };
135 
136 }
137 
138 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::Collector::setNextReader
virtual void setNextReader(const IndexReaderPtr &reader, int32_t docBase)=0
Called before collecting from each IndexReader. All doc ids in collect(int32_t) will correspond to re...
Lucene::Collector::collect
virtual void collect(int32_t doc)=0
Called once for every document matching a query, with the unbased document number.
Lucene::Collector::acceptsDocsOutOfOrder
virtual bool acceptsDocsOutOfOrder()=0
Return true if this collector does not require the matching docIDs to be delivered in int sort order ...
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::Collector::setScorer
virtual void setScorer(const ScorerPtr &scorer)=0
Called before successive calls to collect(int32_t). Implementations that need the score of the curren...
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Lucene::ScorerPtr
boost::shared_ptr< Scorer > ScorerPtr
Definition: LuceneTypes.h:429
Lucene::Collector::~Collector
virtual ~Collector()
Lucene::Collector
Collectors are primarily meant to be used to gather raw results from a search, and implement sorting ...
Definition: Collector.h:100
LuceneObject.h

clucene.sourceforge.net