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


lucene::search::RangeQuery Class Reference

Constructs a query selecting all terms greater than lowerTerm but less than upperTerm. More...

#include <RangeQuery.h>

Inheritance diagram for lucene::search::RangeQuery:

lucene::search::Query

Public Member Functions

 RangeQuery (lucene::index::Term *LowerTerm, lucene::index::Term *UpperTerm, const bool Inclusive)
 ~RangeQuery ()
const TCHAR * getQueryName () const
Queryrewrite (lucene::index::IndexReader *reader)
 Expert: called to re-write queries into primitive queries.
Querycombine (Query **queries)
 Expert: called when re-writing queries under MultiSearcher.
TCHAR * toString (const TCHAR *field) 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 (Query *other) const
lucene::index::TermgetLowerTerm (bool pointer=true) const
lucene::index::TermgetUpperTerm (bool pointer=true) const
bool isInclusive () const
const TCHAR * getField () const
size_t hashCode () const

Static Public Member Functions

static const TCHAR * getClassName ()

Protected Member Functions

 RangeQuery (const RangeQuery &clone)

Detailed Description

Constructs a query selecting all terms greater than lowerTerm but less than upperTerm.

There must be at least one term and either term may be null, in which case there is no bound on that side, but if there are two terms, both terms must be for the same field.


Constructor & Destructor Documentation

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

lucene::search::RangeQuery::RangeQuery ( lucene::index::Term LowerTerm,
lucene::index::Term UpperTerm,
const bool  Inclusive 
)

lucene::search::RangeQuery::~RangeQuery (  ) 


Member Function Documentation

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

Implements lucene::search::Query.

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

Query* lucene::search::RangeQuery::rewrite ( lucene::index::IndexReader reader  )  [virtual]

Expert: called to re-write queries into primitive queries.

Reimplemented from lucene::search::Query.

Query* lucene::search::RangeQuery::combine ( Query **  queries  )  [virtual]

Expert: called when re-writing queries under MultiSearcher.

Only implemented by derived queries, with no _createWeight(Searcher) implementatation.

Reimplemented from lucene::search::Query.

TCHAR* lucene::search::RangeQuery::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::RangeQuery::clone (  )  const [virtual]

Returns a clone of this query.

Implements lucene::search::Query.

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

Implements lucene::search::Query.

lucene:: index ::Term* lucene::search::RangeQuery::getLowerTerm ( bool  pointer = true  )  const

lucene:: index ::Term* lucene::search::RangeQuery::getUpperTerm ( bool  pointer = true  )  const

bool lucene::search::RangeQuery::isInclusive (  )  const

const TCHAR* lucene::search::RangeQuery::getField (  )  const

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

Implements lucene::search::Query.


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

clucene.sourceforge.net