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
PerFieldAnalyzerWrapper.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 PERFIELDANALYZERWRAPPER_H
8 #define PERFIELDANALYZERWRAPPER_H
9
10 #include "Analyzer.h"
11
12 namespace Lucene
13 {
29 class LPPAPI PerFieldAnalyzerWrapper : public Analyzer
30 {
31 public:
35 PerFieldAnalyzerWrapper(AnalyzerPtr defaultAnalyzer);
36
40 PerFieldAnalyzerWrapper(AnalyzerPtr defaultAnalyzer, MapStringAnalyzer fieldAnalyzers);
41
42 virtual ~PerFieldAnalyzerWrapper();
43
44 LUCENE_CLASS(PerFieldAnalyzerWrapper);
45
46 protected:
47 AnalyzerPtr defaultAnalyzer;
48 MapStringAnalyzer analyzerMap;
49
50 public:
54 void addAnalyzer(const String& fieldName, AnalyzerPtr analyzer);
55
56 virtual TokenStreamPtr tokenStream(const String& fieldName, ReaderPtr reader);
57 virtual TokenStreamPtr reusableTokenStream(const String& fieldName, ReaderPtr reader);
58
60 virtual int32_t getPositionIncrementGap(const String& fieldName);
61
63 virtual int32_t getOffsetGap(FieldablePtr field);
64
65 virtual String toString();
66 };
67 }
68
69 #endif

clucene.sourceforge.net