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
include
PerFieldAnalyzerWrapper.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 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
clucene.sourceforge.net