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


LengthFilter.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 LENGTHFILTER_H
8 #define LENGTHFILTER_H
9 
10 #include "TokenFilter.h"
11 
12 namespace Lucene {
13 
15 class LPPAPI LengthFilter : public TokenFilter {
16 public:
18  LengthFilter(const TokenStreamPtr& input, int32_t min, int32_t max);
19  virtual ~LengthFilter();
20 
22 
23 public:
24  int32_t min;
25  int32_t max;
26 
27 protected:
29 
30 public:
32  virtual bool incrementToken();
33 };
34 
35 }
36 
37 #endif
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Removes words that are too long or too short from the stream.
Definition: LengthFilter.h:15
int32_t min
Definition: LengthFilter.h:21
int32_t max
Definition: LengthFilter.h:25
LengthFilter(const TokenStreamPtr &input, int32_t min, int32_t max)
Build a filter that removes words that are too long or too short from the text.
TermAttributePtr termAtt
Definition: LengthFilter.h:28
virtual bool incrementToken()
Returns the next input Token whose term() is the right len.
A TokenFilter is a TokenStream whose input is another TokenStream.
Definition: TokenFilter.h:18
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< TokenStream > TokenStreamPtr
Definition: LuceneTypes.h:63
boost::shared_ptr< TermAttribute > TermAttributePtr
Definition: LuceneTypes.h:58

clucene.sourceforge.net