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