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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
StandardAnalyzer.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 STANDARDANALYZER_H
8 #define STANDARDANALYZER_H
9 
10 #include "Analyzer.h"
11 
12 namespace Lucene
13 {
23  class LPPAPI StandardAnalyzer : public Analyzer
24  {
25  public:
29 
34 
39  StandardAnalyzer(LuceneVersion::Version matchVersion, const String& stopwords);
40 
45  StandardAnalyzer(LuceneVersion::Version matchVersion, ReaderPtr stopwords);
46 
47  virtual ~StandardAnalyzer();
48 
50 
51  public:
53  static const int32_t DEFAULT_MAX_TOKEN_LENGTH;
54 
55  protected:
57 
61 
63 
64  int32_t maxTokenLength;
65 
66  protected:
68  void ConstructAnalyser(LuceneVersion::Version matchVersion, HashSet<String> stopWords);
69 
70  public:
73  virtual TokenStreamPtr tokenStream(const String& fieldName, ReaderPtr reader);
74 
77  void setMaxTokenLength(int32_t length);
78 
80  int32_t getMaxTokenLength();
81 
82  virtual TokenStreamPtr reusableTokenStream(const String& fieldName, ReaderPtr reader);
83  };
84 }
85 
86 #endif

clucene.sourceforge.net