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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
Lucene::StopAnalyzer Class Reference

Filters LetterTokenizer with LowerCaseFilter and StopFilter. More...

`#include <StopAnalyzer.h>`

Inheritance diagram for Lucene::StopAnalyzer:

## Public Member Functions

| StopAnalyzer (LuceneVersion::Version matchVersion)
| Builds an analyzer which removes words in ENGLISH_STOP_WORDS_SET. More...
| StopAnalyzer (LuceneVersion::Version matchVersion, HashSet< String > stopWords)
| Builds an analyzer with the stop words from the given set. More...
| StopAnalyzer (LuceneVersion::Version matchVersion, const String &stopwordsFile)
| Builds an analyzer with the stop words from the given file. More...
| StopAnalyzer (LuceneVersion::Version matchVersion, ReaderPtr stopwords)
| Builds an analyzer with the stop words from the given reader. More...
virtual | ~StopAnalyzer ()
virtual String | getClassName ()
boost::shared_ptr< StopAnalyzer > | shared_from_this ()
virtual TokenStreamPtr | tokenStream (const String &fieldName, ReaderPtr reader)
| Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility. More...
virtual TokenStreamPtr | reusableTokenStream (const String &fieldName, ReaderPtr reader)
| Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance. More...
Public Member Functions inherited from Lucene::Analyzer
virtual | ~Analyzer ()
boost::shared_ptr< Analyzer > | shared_from_this ()
virtual int32_t | getPositionIncrementGap (const String &fieldName)

Invoked before indexing a Fieldable instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between Fieldable instances using the same field name. The default value position increment gap is 0. With a 0 position increment gap and the typical default token position increment of 1, all terms in a field, including across Fieldable instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across Fieldable instance boundaries. More...

virtual int32_t | getOffsetGap (FieldablePtr field)
| Just like getPositionIncrementGap, except for Token offsets instead. By default this returns 1 for tokenized fields and, as if the fields were joined with an extra space character, and 0 for un-tokenized fields. This method is only called if the field produced at least one token for indexing. More...
virtual void | close ()
| Frees persistent resources used by this Analyzer. More...
Public Member Functions inherited from Lucene::LuceneObject
virtual | ~LuceneObject ()
virtual void | initialize ()
| Called directly after instantiation to create objects that depend on this object being fully constructed. More...
virtual LuceneObjectPtr | clone (LuceneObjectPtr other=LuceneObjectPtr())
| Return clone of this object. More...
virtual int32_t | hashCode ()
| Return hash code for this object. More...
virtual bool | equals (LuceneObjectPtr other)
| Return whether two objects are equal. More...
virtual int32_t | compareTo (LuceneObjectPtr other)
| Compare two objects. More...
virtual String | toString ()
| Returns a string representation of the object. More...
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock. More...
virtual LuceneSignalPtr | getSignal ()
| Return this object signal. More...
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout. More...
virtual void | unlock ()
| Unlock this object. More...
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread. More...
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout. More...
virtual void | notifyAll ()
| Notify all threads waiting for signal. More...

## Static Public Member Functions

static String | _getClassName ()
static const HashSet< String > | ENGLISH_STOP_WORDS_SET ()
| An unmodifiable set containing some common English words that are usually not useful for searching. More...
Static Public Member Functions inherited from Lucene::Analyzer
static String | _getClassName ()

## Protected Attributes

HashSet< String > | stopWords
bool | enablePositionIncrements
Protected Attributes inherited from Lucene::Analyzer
CloseableThreadLocal < LuceneObject > | tokenStreams

## Static Protected Attributes

static const wchar_t * | _ENGLISH_STOP_WORDS_SET []

## Additional Inherited Members

Protected Member Functions inherited from Lucene::Analyzer
virtual LuceneObjectPtr | getPreviousTokenStream ()
| Used by Analyzers that implement reusableTokenStream to retrieve previously saved TokenStreams for re-use by the same thread. More...
virtual void | setPreviousTokenStream (LuceneObjectPtr stream)
| Used by Analyzers that implement reusableTokenStream to save a TokenStream for later re-use by the same thread. More...

## Detailed Description

Filters LetterTokenizer with LowerCaseFilter and StopFilter.

You must specify the required Version compatibility when creating StopAnalyzer: As of 2.9, position increments are preserved

## Constructor & Destructor Documentation

Lucene::StopAnalyzer::StopAnalyzer | ( | LuceneVersion::Version | matchVersion) |  |

Builds an analyzer which removes words in ENGLISH_STOP_WORDS_SET.

Lucene::StopAnalyzer::StopAnalyzer | ( | LuceneVersion::Version | matchVersion,
|  | HashSet< String > | stopWords
| ) |  |

Builds an analyzer with the stop words from the given set.

Lucene::StopAnalyzer::StopAnalyzer | ( | LuceneVersion::Version | matchVersion,
|  | const String & | stopwordsFile
| ) |  |

Builds an analyzer with the stop words from the given file.

Lucene::StopAnalyzer::StopAnalyzer | ( | LuceneVersion::Version | matchVersion,
|  | ReaderPtr | stopwords
| ) |  |

Builds an analyzer with the stop words from the given reader.

virtual Lucene::StopAnalyzer::~StopAnalyzer | ( | ) |  |

virtual

## Member Function Documentation

static String Lucene::StopAnalyzer::_getClassName | ( | ) |  |

inline static

static const HashSet<String> Lucene::StopAnalyzer::ENGLISH_STOP_WORDS_SET | ( | ) |  |

static

An unmodifiable set containing some common English words that are usually not useful for searching.

virtual String Lucene::StopAnalyzer::getClassName | ( | ) |  |

inline virtual

Reimplemented from Lucene::Analyzer.

virtual TokenStreamPtr Lucene::StopAnalyzer::reusableTokenStream | ( | const String & | fieldName,
|  | ReaderPtr | reader
| ) |  |

virtual

Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Reimplemented from Lucene::Analyzer.

boost::shared_ptr< StopAnalyzer > Lucene::StopAnalyzer::shared_from_this | ( | ) |  |

inline

virtual TokenStreamPtr Lucene::StopAnalyzer::tokenStream | ( | const String & | fieldName,
|  | ReaderPtr | reader
| ) |  |

virtual

Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Implements Lucene::Analyzer.

## Field Documentation

const wchar_t* Lucene::StopAnalyzer::_ENGLISH_STOP_WORDS_SET[]

static protected

bool Lucene::StopAnalyzer::enablePositionIncrements

protected

HashSet<String> Lucene::StopAnalyzer::stopWords

protected

The documentation for this class was generated from the following file:

- StopAnalyzer.h

clucene.sourceforge.net