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
StopFilter.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 STOPFILTER_H
8
#define STOPFILTER_H
9
10
#include "
TokenFilter.h
"
11
12
namespace
Lucene {
13
15
class
LPPAPI
StopFilter
:
public
TokenFilter
{
16
public
:
28
StopFilter
(
bool
enablePositionIncrements,
const
TokenStreamPtr
& input,
HashSet<String>
stopWords,
bool
ignoreCase =
false
);
29
StopFilter
(
bool
enablePositionIncrements,
const
TokenStreamPtr
& input,
const
CharArraySetPtr
& stopWords,
bool
ignoreCase =
false
);
30
31
virtual
~
StopFilter
();
32
33
LUCENE_CLASS
(
StopFilter
);
34
35
protected
:
36
CharArraySetPtr
stopWords
;
37
bool
enablePositionIncrements
;
38
39
TermAttributePtr
termAtt
;
40
PositionIncrementAttributePtr
posIncrAtt
;
41
42
public
:
44
static
HashSet<String>
makeStopSet(
Collection<String>
stopWords);
45
47
virtual
bool
incrementToken();
48
51
static
bool
getEnablePositionIncrementsVersionDefault(
LuceneVersion::Version
matchVersion);
52
54
bool
getEnablePositionIncrements();
55
63
void
setEnablePositionIncrements(
bool
enable);
64
};
65
66
}
67
68
#endif
clucene.sourceforge.net