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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FieldCacheRangeFilter.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 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 FIELDCACHERANGEFILTER_H
8 #define FIELDCACHERANGEFILTER_H
9 
10 #include "Filter.h"
11 #include "FieldCache.h"
12 
13 namespace Lucene
14 {
38  class LPPAPI FieldCacheRangeFilter : public Filter
39  {
40  public:
41  FieldCacheRangeFilter(const String& field, ParserPtr parser, bool includeLower, bool includeUpper);
42  virtual ~FieldCacheRangeFilter();
43 
45 
46  INTERNAL:
47  String field;
51 
52  public:
55  static FieldCacheRangeFilterPtr newStringRange(const String& field, const String& lowerVal, const String& upperVal, bool includeLower, bool includeUpper);
56 
60  static FieldCacheRangeFilterPtr newByteRange(const String& field, uint8_t lowerVal, uint8_t upperVal, bool includeLower, bool includeUpper);
61 
65  static FieldCacheRangeFilterPtr newByteRange(const String& field, ByteParserPtr parser, uint8_t lowerVal, uint8_t upperVal, bool includeLower, bool includeUpper);
66 
70  static FieldCacheRangeFilterPtr newIntRange(const String& field, int32_t lowerVal, int32_t upperVal, bool includeLower, bool includeUpper);
71 
75  static FieldCacheRangeFilterPtr newIntRange(const String& field, IntParserPtr parser, int32_t lowerVal, int32_t upperVal, bool includeLower, bool includeUpper);
76 
80  static FieldCacheRangeFilterPtr newLongRange(const String& field, int64_t lowerVal, int64_t upperVal, bool includeLower, bool includeUpper);
81 
85  static FieldCacheRangeFilterPtr newLongRange(const String& field, LongParserPtr parser, int64_t lowerVal, int64_t upperVal, bool includeLower, bool includeUpper);
86 
90  static FieldCacheRangeFilterPtr newDoubleRange(const String& field, double lowerVal, double upperVal, bool includeLower, bool includeUpper);
91 
95  static FieldCacheRangeFilterPtr newDoubleRange(const String& field, DoubleParserPtr parser, double lowerVal, double upperVal, bool includeLower, bool includeUpper);
96 
97  virtual String toString() = 0;
98  virtual bool equals(LuceneObjectPtr other) = 0;
99  virtual int32_t hashCode() = 0;
100 
102  virtual String getField();
103 
105  virtual bool includesLower();
106 
108  virtual bool includesUpper();
109 
111  virtual ParserPtr getParser();
112  };
113 }
114 
115 #endif

clucene.sourceforge.net