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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DisjunctionMaxQuery.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 DISJUNCTIONMAXQUERY_H
8 #define DISJUNCTIONMAXQUERY_H
9 
10 #include "Query.h"
11 
12 namespace Lucene
13 {
27  class LPPAPI DisjunctionMaxQuery : public Query
28  {
29  public:
36  DisjunctionMaxQuery(double tieBreakerMultiplier = 0.0);
37 
41  DisjunctionMaxQuery(Collection<QueryPtr> disjuncts, double tieBreakerMultiplier);
42 
43  virtual ~DisjunctionMaxQuery();
44 
46 
47  protected:
49  Collection<QueryPtr> disjuncts;
50 
53 
54  public:
55  using Query::toString;
56 
59  void add(QueryPtr query);
60 
62  void add(Collection<QueryPtr> disjuncts);
63 
67 
69  virtual WeightPtr createWeight(SearcherPtr searcher);
70 
74  virtual QueryPtr rewrite(IndexReaderPtr reader);
75 
78  virtual LuceneObjectPtr clone(LuceneObjectPtr other = LuceneObjectPtr());
79 
81  virtual void extractTerms(SetTerm terms);
82 
86  virtual String toString(const String& field);
87 
90  virtual bool equals(LuceneObjectPtr other);
91 
92  virtual int32_t hashCode();
93 
94  friend class DisjunctionMaxWeight;
95  };
96 }
97 
98 #endif

clucene.sourceforge.net