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


DoubleFieldSource.h
Go to the documentation of this file.
1 // 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 
26 public:
29  virtual ~DoubleFieldSource();
30 
32 
33 protected:
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:
46  virtual ~DoubleDocValues();
47 
49 
50 protected:
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
Definition: DoubleFieldSource.h:43
boost::shared_ptr< FieldCache > FieldCachePtr
Definition: LuceneTypes.h:334
virtual int32_t cachedFieldSourceHashCode()
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those ar...
boost::shared_ptr< DoubleParser > DoubleParserPtr
Definition: LuceneTypes.h:328
String field
Definition: FieldCacheSource.h:34
A base class for ValueSource implementations that retrieve values for a single field from the FieldCa...
Definition: FieldCacheSource.h:28
virtual DocValuesPtr getCachedFieldValues(const FieldCachePtr &cache, const String &field, const IndexReaderPtr &reader)
Return cached DocValues for input field and reader.
virtual String toString()
Returns a string representation of the object.
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Represents field values as different types. Normally created via a ValueSuorce for a particular field...
Definition: DocValues.h:22
boost::shared_ptr< FieldCacheSource > FieldCacheSourcePtr
Definition: LuceneTypes.h:345
DoubleFieldSource(const String &field, const DoubleParserPtr &parser=DoubleParserPtr())
Create a cached double field source with a specific string-to-double parser.
virtual bool cachedFieldSourceEquals(const FieldCacheSourcePtr &other)
Check if equals to another FieldCacheSource, already knowing that cache and field are equal...
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
DoubleParserPtr parser
Definition: DoubleFieldSource.h:31
boost::shared_ptr< DoubleFieldSource > DoubleFieldSourcePtr
Definition: LuceneTypes.h:327
Obtains double field values from the FieldCache using getDoubles() and makes those values available a...
Definition: DoubleFieldSource.h:25
Collection< double > arr
Definition: DoubleFieldSource.h:52
virtual String description()
Description of field, used in explain()
boost::shared_ptr< DocValues > DocValuesPtr
Definition: LuceneTypes.h:325
boost::weak_ptr< DoubleFieldSource > DoubleFieldSourceWeakPtr
Definition: LuceneTypes.h:327

clucene.sourceforge.net