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


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Member Functions
Lucene::WildcardTermEnum Class Reference

Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term. More...

#include <WildcardTermEnum.h>

+ Inheritance diagram for Lucene::WildcardTermEnum:

Public Member Functions

 WildcardTermEnum (const IndexReaderPtr &reader, const TermPtr &term)
 Creates a new WildcardTermEnum.
 
virtual ~WildcardTermEnum ()
 
virtual String getClassName ()
 
boost::shared_ptr< WildcardTermEnumshared_from_this ()
 
virtual double difference ()
 Equality measure on the term.
 
- Public Member Functions inherited from Lucene::FilteredTermEnum
virtual ~FilteredTermEnum ()
 
boost::shared_ptr< FilteredTermEnumshared_from_this ()
 
virtual int32_t docFreq ()
 Returns the docFreq of the current Term in the enumeration. Returns -1 if no Term matches or all terms have been enumerated.
 
virtual bool next ()
 Increments the enumeration to the next element. True if one exists.
 
virtual TermPtr term ()
 Returns the current Term in the enumeration. Returns null if no Term matches or all terms have been enumerated.
 
virtual void close ()
 Closes the enumeration to further activity, freeing resources.
 
- Public Member Functions inherited from Lucene::TermEnum
virtual ~TermEnum ()
 
boost::shared_ptr< TermEnumshared_from_this ()
 
- 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.
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
 
virtual int32_t hashCode ()
 Return hash code for this object.
 
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal.
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
 
virtual String toString ()
 Returns a string representation of the object.
 
- Public Member Functions inherited from Lucene::LuceneSync
virtual ~LuceneSync ()
 
virtual SynchronizePtr getSync ()
 Return this object synchronize lock.
 
virtual LuceneSignalPtr getSignal ()
 Return this object signal.
 
virtual void lock (int32_t timeout=0)
 Lock this object using an optional timeout.
 
virtual void unlock ()
 Unlock this object.
 
virtual bool holdsLock ()
 Returns true if this object is currently locked by current thread.
 
virtual void wait (int32_t timeout=0)
 Wait for signal using an optional timeout.
 
virtual void notifyAll ()
 Notify all threads waiting for signal.
 

Static Public Member Functions

static String _getClassName ()
 
static bool wildcardEquals (const String &pattern, int32_t patternIdx, const String &string, int32_t stringIdx)
 Determines if a word matches a wildcard pattern.
 
- Static Public Member Functions inherited from Lucene::FilteredTermEnum
static String _getClassName ()
 
- Static Public Member Functions inherited from Lucene::TermEnum
static String _getClassName ()
 

Data Fields

TermPtr searchTerm
 
String field
 
String text
 
String pre
 
int32_t preLen
 
bool _endEnum
 

Static Public Attributes

static const wchar_t WILDCARD_STRING
 
static const wchar_t WILDCARD_CHAR
 

Protected Member Functions

virtual bool termCompare (const TermPtr &term)
 Equality compare on the term.
 
virtual bool endEnum ()
 Indicates the end of the enumeration has been reached.
 
- Protected Member Functions inherited from Lucene::FilteredTermEnum
virtual void setEnum (const TermEnumPtr &actualEnum)
 Use this method to set the actual TermEnum (eg. in ctor), it will be automatically positioned on the first matching term.
 
- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 

Additional Inherited Members

- Protected Attributes inherited from Lucene::FilteredTermEnum
TermPtr currentTerm
 The current term.
 
TermEnumPtr actualEnum
 The delegate enum - to set this member use setEnum.
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Detailed Description

Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Constructor & Destructor Documentation

◆ WildcardTermEnum()

Lucene::WildcardTermEnum::WildcardTermEnum ( const IndexReaderPtr reader,
const TermPtr term 
)

Creates a new WildcardTermEnum.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

◆ ~WildcardTermEnum()

virtual Lucene::WildcardTermEnum::~WildcardTermEnum ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::WildcardTermEnum::_getClassName ( )
inlinestatic

◆ difference()

virtual double Lucene::WildcardTermEnum::difference ( )
virtual

Equality measure on the term.

Implements Lucene::FilteredTermEnum.

◆ endEnum()

virtual bool Lucene::WildcardTermEnum::endEnum ( )
protectedvirtual

Indicates the end of the enumeration has been reached.

Implements Lucene::FilteredTermEnum.

◆ getClassName()

virtual String Lucene::WildcardTermEnum::getClassName ( )
inlinevirtual

Reimplemented from Lucene::FilteredTermEnum.

◆ shared_from_this()

boost::shared_ptr< WildcardTermEnum > Lucene::WildcardTermEnum::shared_from_this ( )
inline

◆ termCompare()

virtual bool Lucene::WildcardTermEnum::termCompare ( const TermPtr term)
protectedvirtual

Equality compare on the term.

Implements Lucene::FilteredTermEnum.

◆ wildcardEquals()

static bool Lucene::WildcardTermEnum::wildcardEquals ( const String &  pattern,
int32_t  patternIdx,
const String &  string,
int32_t  stringIdx 
)
static

Determines if a word matches a wildcard pattern.

Field Documentation

◆ _endEnum

bool Lucene::WildcardTermEnum::_endEnum

◆ field

String Lucene::WildcardTermEnum::field

◆ pre

String Lucene::WildcardTermEnum::pre

◆ preLen

int32_t Lucene::WildcardTermEnum::preLen

◆ searchTerm

TermPtr Lucene::WildcardTermEnum::searchTerm

◆ text

String Lucene::WildcardTermEnum::text

◆ WILDCARD_CHAR

const wchar_t Lucene::WildcardTermEnum::WILDCARD_CHAR
static

◆ WILDCARD_STRING

const wchar_t Lucene::WildcardTermEnum::WILDCARD_STRING
static

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

clucene.sourceforge.net