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

clucene.sourceforge.net