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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SpanWeight.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 SPANWEIGHT_H
8 #define SPANWEIGHT_H
9 
10 #include "Weight.h"
11 
12 namespace Lucene {
13 
15 class LPPAPI SpanWeight : public Weight {
16 public:
17  SpanWeight(const SpanQueryPtr& query, const SearcherPtr& searcher);
18  virtual ~SpanWeight();
19 
21 
22 protected:
24  double value;
25  double idf;
26  double queryNorm;
27  double queryWeight;
28 
29  SetTerm terms;
32 
33 public:
34  virtual QueryPtr getQuery();
35  virtual double getValue();
36  virtual double sumOfSquaredWeights();
37  virtual void normalize(double norm);
38  virtual ScorerPtr scorer(const IndexReaderPtr& reader, bool scoreDocsInOrder, bool topScorer);
39  virtual ExplanationPtr explain(const IndexReaderPtr& reader, int32_t doc);
40 
41  friend class PayloadNearSpanScorer;
42  friend class PayloadTermSpanScorer;
43 };
44 
45 }
46 
47 #endif

clucene.sourceforge.net