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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Query.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 QUERY_H
8 #define QUERY_H
9 
10 #include "LuceneObject.h"
11 
12 namespace Lucene
13 {
31  class LPPAPI Query : public LuceneObject
32  {
33  public:
34  Query();
35  virtual ~Query();
36 
38 
39  protected:
40  double boost; // query boost factor
41 
42  public:
45  virtual void setBoost(double b);
46 
49  virtual double getBoost();
50 
62  virtual String toString(const String& field);
63 
65  virtual String toString();
66 
69  virtual WeightPtr createWeight(SearcherPtr searcher);
70 
72  virtual WeightPtr weight(SearcherPtr searcher);
73 
76  virtual QueryPtr rewrite(IndexReaderPtr reader);
77 
85  virtual QueryPtr combine(Collection<QueryPtr> queries);
86 
89  virtual void extractTerms(SetTerm terms);
90 
94  static QueryPtr mergeBooleanQueries(Collection<BooleanQueryPtr> queries);
95 
99  virtual SimilarityPtr getSimilarity(SearcherPtr searcher);
100 
102  virtual LuceneObjectPtr clone(LuceneObjectPtr other = LuceneObjectPtr());
103 
104  virtual int32_t hashCode();
105  virtual bool equals(LuceneObjectPtr other);
106 
108  String boostString();
109  };
110 }
111 
112 #endif

clucene.sourceforge.net