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

lucene::search::PhraseQuery Class Reference

#include <PhraseQuery.h>

Inheritance diagram for lucene::search::PhraseQuery:


Public Member Functions

 PhraseQuery ()
 ~PhraseQuery ()
const TCHAR * getQueryName () const
void setSlop (const int32_t s)
int32_t getSlop () const
void add (lucene::index::Term *term)
void add (lucene::index::Term *term, int32_t position)
float_t sumOfSquaredWeights (Searcher *searcher)
void normalize (const float_t norm)
Scorerscorer (lucene::index::IndexReader *reader)
lucene::index::Term ** getTerms () const
int32_t * getPositions () const
void getPositions (lucene::util::Array< int32_t > &result) const
const TCHAR * getFieldName () const
TCHAR * toString (const TCHAR *f) const
 Prints a query to a string, with field assumed to be the default field and omitted.
Queryclone () const
 Returns a clone of this query.
bool equals (lucene::search::Query *) const
size_t hashCode () const

Static Public Member Functions

static const TCHAR * getClassName ()

Protected Member Functions

Weight_createWeight (Searcher *searcher)
 Expert: Constructs an appropriate Weight implementation for this query.
 PhraseQuery (const PhraseQuery &clone)


class PhraseWeight

Constructor & Destructor Documentation

lucene::search::PhraseQuery::PhraseQuery ( const PhraseQuery clone  )  [protected]

lucene::search::PhraseQuery::PhraseQuery (  ) 

lucene::search::PhraseQuery::~PhraseQuery (  ) 

Member Function Documentation

Weight* lucene::search::PhraseQuery::_createWeight ( Searcher searcher  )  [protected, virtual]

Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves. This is an Internal function

Reimplemented from lucene::search::Query.

const TCHAR* lucene::search::PhraseQuery::getQueryName (  )  const [virtual]

Implements lucene::search::Query.

static const TCHAR* lucene::search::PhraseQuery::getClassName (  )  [static]

void lucene::search::PhraseQuery::setSlop ( const int32_t  s  )  [inline]

int32_t lucene::search::PhraseQuery::getSlop (  )  const [inline]

void lucene::search::PhraseQuery::add ( lucene::index::Term term  ) 

void lucene::search::PhraseQuery::add ( lucene::index::Term term,
int32_t  position 

float_t lucene::search::PhraseQuery::sumOfSquaredWeights ( Searcher searcher  ) 

void lucene::search::PhraseQuery::normalize ( const float_t  norm  ) 

Scorer* lucene::search::PhraseQuery::scorer ( lucene::index::IndexReader reader  ) 

lucene:: index ::Term** lucene::search::PhraseQuery::getTerms (  )  const

int32_t* lucene::search::PhraseQuery::getPositions (  )  const

void lucene::search::PhraseQuery::getPositions ( lucene::util::Array< int32_t > &  result  )  const

. use getPositions(Array<int32_t>& result)

const TCHAR* lucene::search::PhraseQuery::getFieldName (  )  const [inline]

TCHAR* lucene::search::PhraseQuery::toString ( const TCHAR *  field  )  const [virtual]

Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Implements lucene::search::Query.

Query* lucene::search::PhraseQuery::clone (  )  const [virtual]

Returns a clone of this query.

Implements lucene::search::Query.

bool lucene::search::PhraseQuery::equals ( lucene::search::Query  )  const [virtual]

Implements lucene::search::Query.

size_t lucene::search::PhraseQuery::hashCode (  )  const [virtual]

Implements lucene::search::Query.

Friends And Related Function Documentation

friend class PhraseWeight [friend]

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