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


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

clucene.sourceforge.net