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

Loading...
Searching...
No Matches
BooleanClause.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef BOOLEANCLAUSE_H
8#define BOOLEANCLAUSE_H
9
10#include "LuceneObject.h"
11
12 namespace Lucene {
13
15 class LPPAPI BooleanClause : public LuceneObject {
16 public:
18 enum Occur {
20 MUST,
21
25 SHOULD,
26
29 MUST_NOT
30 };
31
32 public:
33 BooleanClause(const QueryPtr& query, Occur occur);
34 virtual ~BooleanClause();
35
36 LUCENE_CLASS(BooleanClause);
37
38 protected:
40 QueryPtr query;
41 Occur occur;
42
43 public:
44 Occur getOccur();
45 void setOccur(Occur occur);
46
47 QueryPtr getQuery();
48 void setQuery(const QueryPtr& query);
49
50 bool isProhibited();
51 bool isRequired();
52
53 virtual bool equals(const LuceneObjectPtr& other);
54 virtual int32_t hashCode();
55 virtual String toString();
56};
57
58}
59
60#endif
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::BooleanClause::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::BooleanClause::BooleanClause
BooleanClause(const QueryPtr &query, Occur occur)
Lucene::BooleanClause::isProhibited
bool isProhibited()
Lucene::BooleanClause::toString
virtual String toString()
Returns a string representation of the object.
Lucene::BooleanClause::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::BooleanClause::setQuery
void setQuery(const QueryPtr &query)
Lucene::BooleanClause::occur
Occur occur
Definition BooleanClause.h:41
Lucene::BooleanClause::isRequired
bool isRequired()
Lucene::BooleanClause::~BooleanClause
virtual ~BooleanClause()
Lucene::BooleanClause::getQuery
QueryPtr getQuery()
Lucene::BooleanClause::Occur
Occur
Specifies how clauses are to occur in matching documents.
Definition BooleanClause.h:18
Lucene::BooleanClause::SHOULD
@ SHOULD
Use this operator for clauses that should appear in the matching documents. For a BooleanQuery with n...
Definition BooleanClause.h:25
Lucene::BooleanClause::MUST
@ MUST
Use this operator for clauses that must appear in the matching documents.
Definition BooleanClause.h:20
Lucene::BooleanClause::MUST_NOT
@ MUST_NOT
Use this operator for clauses that must not appear in the matching documents. Note that it is not pos...
Definition BooleanClause.h:29
Lucene::BooleanClause::query
QueryPtr query
The query whose matching documents are combined by the boolean query.
Definition BooleanClause.h:40
Lucene::BooleanClause::setOccur
void setOccur(Occur occur)
Lucene::BooleanClause::getOccur
Occur getOccur()
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition LuceneTypes.h:420
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539

clucene.sourceforge.net