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

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

A clause in a BooleanQuery. More...

`#include <BooleanClause.h>`

Inheritance diagram for Lucene::BooleanClause:

## Public Types

enum | Occur { MUST , SHOULD , MUST_NOT }
| Specifies how clauses are to occur in matching documents. More...

## Public Member Functions

| BooleanClause (const QueryPtr &query, Occur occur)
virtual | ~BooleanClause ()
virtual String | getClassName ()
boost::shared_ptr< BooleanClause > | shared_from_this ()
Occur | getOccur ()
void | setOccur (Occur occur)
QueryPtr | getQuery ()
void | setQuery (const QueryPtr &query)
bool | isProhibited ()
bool | isRequired ()
virtual bool | equals (const LuceneObjectPtr &other)
| Return whether two objects are equal.
virtual int32_t | hashCode ()
| Return hash code for this object.
virtual String | toString ()
| Returns a string representation of the object.
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 | 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 ()

## Protected Attributes

QueryPtr | query
| The query whose matching documents are combined by the boolean query.
Occur | occur
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Additional Inherited Members

Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()

## Detailed Description

A clause in a BooleanQuery.

## Member Enumeration Documentation

## ◆ Occur

enum Lucene::BooleanClause::Occur

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

## ◆ BooleanClause()

Lucene::BooleanClause::BooleanClause | ( | const QueryPtr & | query,
|  | Occur | occur )

References occur, and query.

Referenced by _getClassName().

## ◆ ~BooleanClause()

virtual Lucene::BooleanClause::~BooleanClause | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

String Lucene::BooleanClause::_getClassName | ( |  | ) |

inline static

References BooleanClause().

## ◆ equals()

virtual bool Lucene::BooleanClause::equals | ( | const LuceneObjectPtr & | other | ) |

virtual

Return whether two objects are equal.

Reimplemented from Lucene::LuceneObject.

## ◆ getClassName()

virtual String Lucene::BooleanClause::getClassName | ( |  | ) |

inline virtual

## ◆ getOccur()

Occur Lucene::BooleanClause::getOccur | ( |  | ) |

## ◆ getQuery()

QueryPtr Lucene::BooleanClause::getQuery | ( |  | ) |

## ◆ hashCode()

virtual int32_t Lucene::BooleanClause::hashCode | ( |  | ) |

virtual

Return hash code for this object.

Reimplemented from Lucene::LuceneObject.

## ◆ isProhibited()

bool Lucene::BooleanClause::isProhibited | ( |  | ) |

## ◆ isRequired()

bool Lucene::BooleanClause::isRequired | ( |  | ) |

## ◆ setOccur()

void Lucene::BooleanClause::setOccur | ( | Occur | occur | ) |

References occur.

## ◆ setQuery()

void Lucene::BooleanClause::setQuery | ( | const QueryPtr & | query | ) |

References query.

## ◆ shared_from_this()

boost::shared_ptr< BooleanClause > Lucene::BooleanClause::shared_from_this | ( |  | ) |

inline

## ◆ toString()

virtual String Lucene::BooleanClause::toString | ( |  | ) |

virtual

Returns a string representation of the object.

Reimplemented from Lucene::LuceneObject.

## Field Documentation

## ◆ occur

Occur Lucene::BooleanClause::occur

protected

Referenced by BooleanClause(), and setOccur().

## ◆ query

QueryPtr Lucene::BooleanClause::query

protected

The query whose matching documents are combined by the boolean query.

Referenced by BooleanClause(), and setQuery().

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

- BooleanClause.h

clucene.sourceforge.net