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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BooleanQuery.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 BOOLEANQUERY_H
8 #define BOOLEANQUERY_H
9 
10 #include "Query.h"
11 #include "BooleanClause.h"
12 #include "Weight.h"
13 
14 namespace Lucene {
15 
18 class LPPAPI BooleanQuery : public Query {
19 public:
27  BooleanQuery(bool disableCoord = false);
28  virtual ~BooleanQuery();
29 
31 
32 protected:
33  static int32_t maxClauseCount;
34 
38 
39 public:
40  using Query::toString;
41 
45  static int32_t getMaxClauseCount();
46 
48  static void setMaxClauseCount(int32_t maxClauseCount);
49 
52  bool isCoordDisabled();
53 
55  virtual SimilarityPtr getSimilarity(const SearcherPtr& searcher);
56 
66  void setMinimumNumberShouldMatch(int32_t min);
67 
69  int32_t getMinimumNumberShouldMatch();
70 
73  void add(const QueryPtr& query, BooleanClause::Occur occur);
74 
77  void add(const BooleanClausePtr& clause);
78 
80  Collection<BooleanClausePtr> getClauses();
81 
85 
86  virtual WeightPtr createWeight(const SearcherPtr& searcher);
87 
88  virtual QueryPtr rewrite(const IndexReaderPtr& reader);
89 
90  virtual void extractTerms(SetTerm terms);
91 
92  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
93  virtual String toString(const String& field);
94  virtual bool equals(const LuceneObjectPtr& other);
95  virtual int32_t hashCode();
96 
97  friend class BooleanWeight;
98 };
99 
100 }
101 
102 #endif

clucene.sourceforge.net