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

PerFieldAnalyzerWrapper.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 PERFIELDANALYZERWRAPPER_H
8 #define PERFIELDANALYZERWRAPPER_H
9
10 #include "Analyzer.h"
11
12 namespace Lucene {
13
29 class LPPAPI PerFieldAnalyzerWrapper : public Analyzer {
30 public:
34 PerFieldAnalyzerWrapper(const AnalyzerPtr& defaultAnalyzer);
35
39 PerFieldAnalyzerWrapper(const AnalyzerPtr& defaultAnalyzer, MapStringAnalyzer fieldAnalyzers);
40
41 virtual ~PerFieldAnalyzerWrapper();
42
43 LUCENE_CLASS(PerFieldAnalyzerWrapper);
44
45 protected:
46 AnalyzerPtr defaultAnalyzer;
47 MapStringAnalyzer analyzerMap;
48
49 public:
53 void addAnalyzer(const String& fieldName, const AnalyzerPtr& analyzer);
54
55 virtual TokenStreamPtr tokenStream(const String& fieldName, const ReaderPtr& reader);
56 virtual TokenStreamPtr reusableTokenStream(const String& fieldName, const ReaderPtr& reader);
57
59 virtual int32_t getPositionIncrementGap(const String& fieldName);
60
62 virtual int32_t getOffsetGap(const FieldablePtr& field);
63
64 virtual String toString();
65 };
66
67 }
68
69 #endif
Analyzer.h
Lucene::Analyzer
An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting index...
Definition: Analyzer.h:19
Lucene::PerFieldAnalyzerWrapper::analyzerMap
MapStringAnalyzer analyzerMap
Definition: PerFieldAnalyzerWrapper.h:47
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::PerFieldAnalyzerWrapper
This analyzer is used to facilitate scenarios where different fields require different analysis techn...
Definition: PerFieldAnalyzerWrapper.h:29
Lucene::ReaderPtr
boost::shared_ptr< Reader > ReaderPtr
Definition: LuceneTypes.h:547
Lucene::AnalyzerPtr
boost::shared_ptr< Analyzer > AnalyzerPtr
Definition: LuceneTypes.h:20
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

clucene.sourceforge.net