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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SpanScorer.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 SPANSCORER_H
8 #define SPANSCORER_H
9 
10 #include "Scorer.h"
11 
12 namespace Lucene {
13 
15 class LPPAPI SpanScorer : public Scorer {
16 public:
17  SpanScorer(const SpansPtr& spans, const WeightPtr& weight, const SimilarityPtr& similarity, ByteArray norms);
18  virtual ~SpanScorer();
19 
21 
22 protected:
25  ByteArray norms;
26  double value;
27  bool more;
28  int32_t doc;
29  double freq;
30 
31 public:
32  virtual int32_t nextDoc();
33  virtual int32_t advance(int32_t target);
34  virtual int32_t docID();
35  virtual double score();
36 
37 protected:
38  virtual bool setFreqCurrentDoc();
39 
42  virtual ExplanationPtr explain(int32_t doc);
43 
44  friend class SpanWeight;
45  friend class PayloadNearSpanWeight;
46 };
47 
48 }
49 
50 #endif

clucene.sourceforge.net