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


lucene::search::BooleanClause Class Reference

#include <BooleanClause.h>


Public Types

enum  Occur { MUST = 1, SHOULD = 2, MUST_NOT = 4 }
 Specifies how clauses are to occur in matching documents. More...

Public Member Functions

int32_t getClauseCount ()
 BooleanClause (Query *q, const bool DeleteQuery, const bool req, const bool p)
 Constructs a BooleanClause with query q, required r and prohibited p.
 BooleanClause (const BooleanClause &clone)
 BooleanClause (Query *q, const bool DeleteQuery, Occur o)
 Constructs a BooleanClause.
BooleanClauseclone () const
 ~BooleanClause ()
bool equals (const BooleanClause *other) const
 Returns true if o is equal to this.
size_t hashCode () const
 Returns a hash code value for this object.
Occur getOccur () const
void setOccur (Occur o)
QuerygetQuery () const
void setQuery (Query *q)
bool isProhibited () const
bool isRequired () const
TCHAR * toString () const

Data Fields

bool deleteQuery
bool required
 If true, documents documents which do not match this sub-query will not match the boolean query.
bool prohibited
 If true, documents documents which do match this sub-query will not match the boolean query.


Member Enumeration Documentation

Specifies how clauses are to occur in matching documents.

Enumerator:
MUST  Use this operator for clauses that must appear in the matching documents.

SHOULD  Use this operator for clauses that should appear in the matching documents.

For a BooleanQuery with no MUST clauses one or more SHOULD clauses must match a document for the BooleanQuery to match.

See also:
BooleanQuery::setMinimumNumberShouldMatch
MUST_NOT  Use this operator for clauses that must not appear in the matching documents.

Note that it is not possible to search for queries that only consist of a MUST_NOT clause.


Constructor & Destructor Documentation

lucene::search::BooleanClause::BooleanClause ( Query q,
const bool  DeleteQuery,
const bool  req,
const bool  p 
)

Constructs a BooleanClause with query q, required r and prohibited p.

Deprecated:
use BooleanClause(Query, Occur) instead
  • For BooleanClause(query, true, false) use BooleanClause(query, BooleanClause.Occur.MUST)
  • For BooleanClause(query, false, false) use BooleanClause(query, BooleanClause.Occur.SHOULD)
  • For BooleanClause(query, false, true) use BooleanClause(query, BooleanClause.Occur.MUST_NOT)

lucene::search::BooleanClause::BooleanClause ( const BooleanClause clone  ) 

lucene::search::BooleanClause::BooleanClause ( Query q,
const bool  DeleteQuery,
Occur  o 
)

Constructs a BooleanClause.

lucene::search::BooleanClause::~BooleanClause (  ) 


Member Function Documentation

int32_t lucene::search::BooleanClause::getClauseCount (  ) 

BooleanClause* lucene::search::BooleanClause::clone (  )  const

bool lucene::search::BooleanClause::equals ( const BooleanClause other  )  const

Returns true if o is equal to this.

size_t lucene::search::BooleanClause::hashCode (  )  const

Returns a hash code value for this object.

Occur lucene::search::BooleanClause::getOccur (  )  const

void lucene::search::BooleanClause::setOccur ( Occur  o  ) 

Query* lucene::search::BooleanClause::getQuery (  )  const

void lucene::search::BooleanClause::setQuery ( Query q  ) 

bool lucene::search::BooleanClause::isProhibited (  )  const

bool lucene::search::BooleanClause::isRequired (  )  const

TCHAR* lucene::search::BooleanClause::toString (  )  const


Field Documentation

If true, documents documents which do not match this sub-query will not match the boolean query.

Deprecated:
use setOccur(BooleanClause.Occur) instead

If true, documents documents which do match this sub-query will not match the boolean query.

Deprecated:
use setOccur(BooleanClause.Occur) instead


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

clucene.sourceforge.net