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


lucene::search::TermQuery Class Reference

A Query that matches documents containing a term. More...

#include <TermQuery.h>

Inheritance diagram for lucene::search::TermQuery:

lucene::search::Query

Public Member Functions

 TermQuery (lucene::index::Term *t)
 ~TermQuery ()
const TCHAR * getQueryName () const
lucene::index::TermgetTerm (bool pointer=true) const
TCHAR * toString (const TCHAR *field) const
 Prints a query to a string, with field assumed to be the default field and omitted.
bool equals (Query *other) const
Queryclone () const
 Returns a clone of this query.
size_t hashCode () const
 Returns a hash code value for this object.

Static Public Member Functions

static const TCHAR * getClassName ()

Protected Member Functions

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

Detailed Description

A Query that matches documents containing a term.

This may be combined with other terms with a BooleanQuery.


Constructor & Destructor Documentation

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

lucene::search::TermQuery::TermQuery ( lucene::index::Term t  ) 

lucene::search::TermQuery::~TermQuery (  ) 


Member Function Documentation

Weight* lucene::search::TermQuery::_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.

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

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

Implements lucene::search::Query.

lucene:: index ::Term* lucene::search::TermQuery::getTerm ( bool  pointer = true  )  const

TCHAR* lucene::search::TermQuery::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.

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

Implements lucene::search::Query.

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

Returns a clone of this query.

Implements lucene::search::Query.

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

Returns a hash code value for this object.

Implements lucene::search::Query.


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

clucene.sourceforge.net