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

Loading...
Searching...
No Matches
FieldCacheSource.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 FIELDCACHESOURCE_H
8#define FIELDCACHESOURCE_H
9
10#include "ValueSource.h"
11
12 namespace Lucene {
13
28 class LPPAPI FieldCacheSource : public ValueSource {
29 public:
31 FieldCacheSource(const String& field);
32 virtual ~FieldCacheSource();
33
34 LUCENE_CLASS(FieldCacheSource);
35
36 protected:
37 String field;
38
39 public:
40 virtual DocValuesPtr getValues(const IndexReaderPtr& reader);
41 virtual String description();
42
47 virtual DocValuesPtr getCachedFieldValues(const FieldCachePtr& cache, const String& field, const IndexReaderPtr& reader) = 0;
48
49 virtual bool equals(const LuceneObjectPtr& other);
50 virtual int32_t hashCode();
51
53 virtual bool cachedFieldSourceEquals(const FieldCacheSourcePtr& other) = 0;
54
57 virtual int32_t cachedFieldSourceHashCode() = 0;
58};
59
60}
61
62#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
ValueSource.h
Lucene::FieldCacheSource::cachedFieldSourceEquals
virtual bool cachedFieldSourceEquals(const FieldCacheSourcePtr &other)=0
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
Lucene::FieldCacheSource::equals
virtual bool equals(const LuceneObjectPtr &other)
Needed for possible caching of query results - used by ValueSourceQuery#equals(LuceneObjectPtr).
Lucene::FieldCacheSource::FieldCacheSource
FieldCacheSource(const String &field)
Create a cached field source for the input field.
Lucene::FieldCacheSource::hashCode
virtual int32_t hashCode()
Needed for possible caching of query results - used by ValueSourceQuery#hashCode().
Lucene::FieldCacheSource::field
String field
Definition FieldCacheSource.h:37
Lucene::FieldCacheSource::cachedFieldSourceHashCode
virtual int32_t cachedFieldSourceHashCode()=0
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those ar...
Lucene::FieldCacheSource::~FieldCacheSource
virtual ~FieldCacheSource()
Lucene::FieldCacheSource::description
virtual String description()
Description of field, used in explain().
Lucene::FieldCacheSource::getCachedFieldValues
virtual DocValuesPtr getCachedFieldValues(const FieldCachePtr &cache, const String &field, const IndexReaderPtr &reader)=0
Return cached DocValues for input field and reader.
Lucene::FieldCacheSource::getValues
virtual DocValuesPtr getValues(const IndexReaderPtr &reader)
Return the DocValues used by the function query.
Lucene::ValueSource
Source of values for basic function queries.
Definition ValueSource.h:21
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::FieldCacheSourcePtr
boost::shared_ptr< FieldCacheSource > FieldCacheSourcePtr
Definition LuceneTypes.h:345
Lucene::DocValuesPtr
boost::shared_ptr< DocValues > DocValuesPtr
Definition LuceneTypes.h:325
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157
Lucene::FieldCachePtr
boost::shared_ptr< FieldCache > FieldCachePtr
Definition LuceneTypes.h:334

clucene.sourceforge.net