Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
Explanation.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 EXPLANATION_H
8
#define EXPLANATION_H
9
10
#include "
LuceneObject.h
"
11
12
namespace
Lucene {
13
15
class
LPPAPI
Explanation
:
public
LuceneObject
{
16
public
:
17
Explanation
(
double
value = 0,
const
String& description = EmptyString);
18
virtual
~
Explanation
();
19
20
LUCENE_CLASS
(
Explanation
);
21
22
protected
:
23
double
value
;
// the value of this node
24
String
description
;
// what it represents
25
Collection<ExplanationPtr>
details
;
// sub-explanations
26
27
public
:
33
virtual
bool
isMatch();
34
36
virtual
double
getValue();
37
39
virtual
void
setValue(
double
value);
40
42
virtual
String getDescription();
43
45
virtual
void
setDescription(
const
String& description);
46
48
virtual
Collection<ExplanationPtr>
getDetails();
49
51
virtual
void
addDetail(
const
ExplanationPtr
& detail);
52
54
virtual
String toString();
55
57
virtual
String toHtml();
58
59
protected
:
62
virtual
String getSummary();
63
64
virtual
String toString(int32_t depth);
65
};
66
70
class
LPPAPI
IDFExplanation
:
public
LuceneObject
{
71
public
:
72
virtual
~
IDFExplanation
();
73
LUCENE_CLASS
(
IDFExplanation
);
74
75
public
:
77
virtual
double
getIdf() = 0;
78
81
virtual
String explain() = 0;
82
};
83
84
}
85
86
#endif
clucene.sourceforge.net