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

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

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Analyzer.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 ANALYZER_H
8 #define ANALYZER_H
9
10 #include "CloseableThreadLocal.h"
11
12 namespace Lucene
13 {
19 class LPPAPI Analyzer : public LuceneObject
20 {
21 public:
22 virtual ~Analyzer();
23 LUCENE_CLASS(Analyzer);
24
25 protected:
26 CloseableThreadLocal<LuceneObject> tokenStreams;
27
28 public:
31 virtual TokenStreamPtr tokenStream(const String& fieldName, ReaderPtr reader) = 0;
32
36 virtual TokenStreamPtr reusableTokenStream(const String& fieldName, ReaderPtr reader);
37
46 virtual int32_t getPositionIncrementGap(const String& fieldName);
47
54 virtual int32_t getOffsetGap(FieldablePtr field);
55
57 virtual void close();
58
59 protected:
62 virtual LuceneObjectPtr getPreviousTokenStream();
63
66 virtual void setPreviousTokenStream(LuceneObjectPtr stream);
67 };
68 }
69
70 #endif

clucene.sourceforge.net