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

PrefixTermEnum.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 PREFIXTERMENUM_H
8 #define PREFIXTERMENUM_H
9
10 #include "FilteredTermEnum.h"
11
12 namespace Lucene {
13
18 class LPPAPI PrefixTermEnum : public FilteredTermEnum {
19 public:
20 PrefixTermEnum(const IndexReaderPtr& reader, const TermPtr& prefix);
21 virtual ~PrefixTermEnum();
22
23 LUCENE_CLASS(PrefixTermEnum);
24
25 protected:
26 TermPtr prefix;
27 bool _endEnum;
28
29 public:
30 virtual double difference();
31
32 protected:
33 virtual bool endEnum();
34 virtual bool termCompare(const TermPtr& term);
35
36 TermPtr getPrefixTerm();
37 };
38
39 }
40
41 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::FilteredTermEnum
Abstract class for enumerating a subset of all terms.
Definition: FilteredTermEnum.h:18
Lucene
Definition: AbstractAllTermDocs.h:12
FilteredTermEnum.h
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Lucene::PrefixTermEnum
Subclass of FilteredTermEnum for enumerating all terms that match the specified prefix filter term.
Definition: PrefixTermEnum.h:18
Lucene::PrefixTermEnum::_endEnum
bool _endEnum
Definition: PrefixTermEnum.h:27

clucene.sourceforge.net