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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

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
45 LUCENE_CLASS(DisjunctionMaxQuery);
46
47 protected:
49 Collection<QueryPtr> disjuncts;
50
52 double tieBreakerMultiplier;
53
54 public:
55 using Query::toString;
56
59 void add(QueryPtr query);
60
62 void add(Collection<QueryPtr> disjuncts);
63
65 Collection<QueryPtr>::iterator begin();
66 Collection<QueryPtr>::iterator end();
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