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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ConstantScoreQuery.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 CONSTANTSCOREQUERY_H
8 #define CONSTANTSCOREQUERY_H
9 
10 #include "Query.h"
11 #include "Weight.h"
12 #include "Scorer.h"
13 
14 namespace Lucene {
15 
18 class LPPAPI ConstantScoreQuery : public Query {
19 public:
20  ConstantScoreQuery(const FilterPtr& filter);
21  virtual ~ConstantScoreQuery();
22 
24 
25 protected:
26  FilterPtr filter;
27 
28 public:
29  using Query::toString;
30 
32  FilterPtr getFilter();
33 
34  virtual QueryPtr rewrite(const IndexReaderPtr& reader);
35  virtual void extractTerms(SetTerm terms);
36 
37  virtual WeightPtr createWeight(const SearcherPtr& searcher);
38 
40  virtual String toString(const String& field);
41 
42  virtual bool equals(const LuceneObjectPtr& other);
43  virtual int32_t hashCode();
44  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
45 
46  friend class ConstantWeight;
47  friend class ConstantScorer;
48 };
49 
50 }
51 
52 #endif

clucene.sourceforge.net