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


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

#include <QueryTermVector.h>

+ Inheritance diagram for Lucene::QueryTermVector:

Public Member Functions

 QueryTermVector (Collection< String > queryTerms)
 
 QueryTermVector (const String &queryString, const AnalyzerPtr &analyzer)
 
virtual ~QueryTermVector ()
 
virtual String getClassName ()
 
boost::shared_ptr< QueryTermVectorshared_from_this ()
 
virtual String toString ()
 Returns a string representation of the object.
 
int32_t size ()
 
Collection< String > getTerms ()
 
Collection< int32_t > getTermFrequencies ()
 Array of term frequencies. Locations of the array correspond one to one to the terms in the array obtained from getTerms method. Each location in the array contains the number of times this term occurs in the document or the document field.
 
int32_t indexOf (const String &term)
 Return an index in the term numbers array returned from getTerms at which the term with the specified term appears. If this term does not appear in the array, return -1.
 
Collection< int32_t > indexesOf (Collection< String > terms, int32_t start, int32_t length)
 Just like indexOf(int) but searches for a number of terms at the same time. Returns an array that has the same size as the number of terms searched for, each slot containing the result of searching for that term number.
 
- Public Member Functions inherited from Lucene::TermFreqVector
virtual ~TermFreqVector ()
 
virtual String getField ()
 The Fieldable name.
 
- 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.
 
- 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 Public Member Functions inherited from Lucene::TermFreqVector
static String _getClassName ()
 

Protected Member Functions

void processTerms (Collection< String > queryTerms)
 
- Protected Member Functions inherited from Lucene::TermFreqVector
 TermFreqVector ()
 
- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 

Protected Attributes

Collection< String > terms
 
Collection< int32_t > termFreqs
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Constructor & Destructor Documentation

◆ QueryTermVector() [1/2]

Lucene::QueryTermVector::QueryTermVector ( Collection< String >  queryTerms)
Parameters
queryTermsThe original list of terms from the query, can contain duplicates

◆ QueryTermVector() [2/2]

Lucene::QueryTermVector::QueryTermVector ( const String &  queryString,
const AnalyzerPtr analyzer 
)

◆ ~QueryTermVector()

virtual Lucene::QueryTermVector::~QueryTermVector ( )
virtual

Member Function Documentation

◆ _getClassName()

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

◆ getClassName()

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

Reimplemented from Lucene::TermFreqVector.

◆ getTermFrequencies()

Collection< int32_t > Lucene::QueryTermVector::getTermFrequencies ( )
virtual

Array of term frequencies. Locations of the array correspond one to one to the terms in the array obtained from getTerms method. Each location in the array contains the number of times this term occurs in the document or the document field.

Reimplemented from Lucene::TermFreqVector.

◆ getTerms()

Collection< String > Lucene::QueryTermVector::getTerms ( )
virtual
Returns
An Array of term texts in ascending order.

Reimplemented from Lucene::TermFreqVector.

◆ indexesOf()

Collection< int32_t > Lucene::QueryTermVector::indexesOf ( Collection< String >  terms,
int32_t  start,
int32_t  length 
)
virtual

Just like indexOf(int) but searches for a number of terms at the same time. Returns an array that has the same size as the number of terms searched for, each slot containing the result of searching for that term number.

Parameters
termsarray containing terms to look for
startindex in the array where the list of terms starts
lengththe number of terms in the list

Reimplemented from Lucene::TermFreqVector.

◆ indexOf()

int32_t Lucene::QueryTermVector::indexOf ( const String &  term)
virtual

Return an index in the term numbers array returned from getTerms at which the term with the specified term appears. If this term does not appear in the array, return -1.

Reimplemented from Lucene::TermFreqVector.

◆ processTerms()

void Lucene::QueryTermVector::processTerms ( Collection< String >  queryTerms)
protected

◆ shared_from_this()

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

◆ size()

int32_t Lucene::QueryTermVector::size ( )
virtual
Returns
The number of terms in the term vector.

Reimplemented from Lucene::TermFreqVector.

◆ toString()

virtual String Lucene::QueryTermVector::toString ( )
virtual

Returns a string representation of the object.

Reimplemented from Lucene::LuceneObject.

Field Documentation

◆ termFreqs

Collection<int32_t> Lucene::QueryTermVector::termFreqs
protected

◆ terms

Collection<String> Lucene::QueryTermVector::terms
protected

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

clucene.sourceforge.net