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

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

- File List
- Globals

Analyzer.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 ANALYZER_H
8 #define ANALYZER_H
9
10 #include "CloseableThreadLocal.h"
11
12 namespace Lucene {
13
19 class LPPAPI Analyzer : public LuceneObject {
20 public:
21 virtual ~Analyzer();
22 LUCENE_CLASS(Analyzer);
23
24 protected:
25 CloseableThreadLocal<LuceneObject> tokenStreams;
26
27 public:
30 virtual TokenStreamPtr tokenStream(const String& fieldName, const ReaderPtr& reader) = 0;
31
35 virtual TokenStreamPtr reusableTokenStream(const String& fieldName, const ReaderPtr& reader);
36
45 virtual int32_t getPositionIncrementGap(const String& fieldName);
46
53 virtual int32_t getOffsetGap(const FieldablePtr& field);
54
56 virtual void close();
57
58 protected:
61 virtual LuceneObjectPtr getPreviousTokenStream();
62
65 virtual void setPreviousTokenStream(const LuceneObjectPtr& stream);
66 };
67
68 }
69
70 #endif
Lucene::Analyzer::tokenStreams
CloseableThreadLocal< LuceneObject > tokenStreams
Definition: Analyzer.h:22
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::ReaderPtr
boost::shared_ptr< Reader > ReaderPtr
Definition: LuceneTypes.h:547
CloseableThreadLocal.h
Lucene::Analyzer
An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting index...
Definition: Analyzer.h:19
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::FieldablePtr
boost::shared_ptr< Fieldable > FieldablePtr
Definition: LuceneTypes.h:76
Lucene::TokenStreamPtr
boost::shared_ptr< TokenStream > TokenStreamPtr
Definition: LuceneTypes.h:63
Lucene::CloseableThreadLocal
General purpose thread-local map.
Definition: CloseableThreadLocal.h:16

clucene.sourceforge.net