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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

TermBuffer.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 TERMBUFFER_H
8 #define TERMBUFFER_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene {
13
14 class TermBuffer : public LuceneObject {
15 public:
16 TermBuffer();
17 virtual ~TermBuffer();
18
19 LUCENE_CLASS(TermBuffer);
20
21 protected:
22 String field;
23 TermPtr term; // cached
24 bool preUTF8Strings; // true if strings are stored in modified UTF8 encoding
25
26 UnicodeResultPtr text;
27 UTF8ResultPtr bytes;
28
29 public:
30 virtual int32_t compareTo(const LuceneObjectPtr& other);
31
33 void setPreUTF8Strings();
34
35 void read(const IndexInputPtr& input, const FieldInfosPtr& fieldInfos);
36
37 void set(const TermPtr& term);
38 void set(const TermBufferPtr& other);
39 void reset();
40
41 TermPtr toTerm();
42
43 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
44
45 protected:
46 int32_t compareChars(wchar_t* chars1, int32_t len1, wchar_t* chars2, int32_t len2);
47 };
48
49 }
50
51 #endif
Lucene::TermBufferPtr
boost::shared_ptr< TermBuffer > TermBufferPtr
Definition: LuceneTypes.h:234
Lucene::UTF8ResultPtr
boost::shared_ptr< UTF8Result > UTF8ResultPtr
Definition: LuceneTypes.h:559
Lucene::TermBuffer::field
String field
Definition: TermBuffer.h:19
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::TermBuffer::setPreUTF8Strings
void setPreUTF8Strings()
Call this if the IndexInput passed to read stores terms in the "modified UTF8" format.
LuceneObject.h
Lucene::UnicodeResultPtr
boost::shared_ptr< UnicodeResult > UnicodeResultPtr
Definition: LuceneTypes.h:554
Lucene::TermBuffer::compareTo
virtual int32_t compareTo(const LuceneObjectPtr &other)
Compare two objects.
Lucene::TermBuffer::text
UnicodeResultPtr text
Definition: TermBuffer.h:26
Lucene::TermBuffer::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Return clone of this object.
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::IndexInputPtr
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::TermBuffer::bytes
UTF8ResultPtr bytes
Definition: TermBuffer.h:27
Lucene::TermBuffer::read
void read(const IndexInputPtr &input, const FieldInfosPtr &fieldInfos)
Lucene::TermBuffer::compareChars
int32_t compareChars(wchar_t *chars1, int32_t len1, wchar_t *chars2, int32_t len2)
Lucene::TermBuffer
Definition: TermBuffer.h:14
Lucene::TermBuffer::reset
void reset()
Lucene::TermBuffer::set
void set(const TermPtr &term)
Lucene::TermBuffer::TermBuffer
TermBuffer()
Lucene::TermBuffer::toTerm
TermPtr toTerm()
Lucene::TermBuffer::~TermBuffer
virtual ~TermBuffer()
Lucene::TermBuffer::term
TermPtr term
Definition: TermBuffer.h:23
Lucene::TermBuffer::preUTF8Strings
bool preUTF8Strings
Definition: TermBuffer.h:24
Lucene::FieldInfosPtr
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition: LuceneTypes.h:127

clucene.sourceforge.net