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
DoubleFieldSource.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 DOUBLEFIELDSOURCE_H
8
#define DOUBLEFIELDSOURCE_H
9
10
#include "
FieldCacheSource.h
"
11
#include "
DocValues.h
"
12
13
namespace
Lucene {
14
25
class
DoubleFieldSource
:
public
FieldCacheSource
{
26
public
:
28
DoubleFieldSource
(
const
String&
field
,
const
DoubleParserPtr
&
parser
=
DoubleParserPtr
());
29
virtual
~DoubleFieldSource
();
30
31
LUCENE_CLASS
(
DoubleFieldSource
);
32
33
protected
:
34
DoubleParserPtr
parser
;
35
36
public
:
37
virtual
String
description
();
38
virtual
DocValuesPtr
getCachedFieldValues
(
const
FieldCachePtr
& cache,
const
String& field,
const
IndexReaderPtr
& reader);
39
virtual
bool
cachedFieldSourceEquals
(
const
FieldCacheSourcePtr
& other);
40
virtual
int32_t
cachedFieldSourceHashCode
();
41
};
42
43
class
DoubleDocValues
:
public
DocValues
{
44
public
:
45
DoubleDocValues
(
const
DoubleFieldSourcePtr
& source,
Collection<double>
arr
);
46
virtual
~DoubleDocValues
();
47
48
LUCENE_CLASS
(
DoubleDocValues
);
49
50
protected
:
51
DoubleFieldSourceWeakPtr
_source
;
52
Collection<double>
arr
;
53
54
public
:
55
virtual
double
doubleVal
(int32_t doc);
56
virtual
String
toString
(int32_t doc);
57
virtual
CollectionValue
getInnerArray
();
58
};
59
60
}
61
62
#endif
clucene.sourceforge.net