CLucene - a full-featured, c++ search engine
API Documentation
00001 /*------------------------------------------------------------------------------ 00002 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team 00003 * 00004 * Distributable under the terms of either the Apache License (Version 2.0) or 00005 * the GNU Lesser General Public License, as specified in the COPYING file. 00006 ------------------------------------------------------------------------------*/ 00007 00008 #ifndef _lucene_search_RangeFilter_ 00009 #define _lucene_search_RangeFilter_ 00010 00011 //#include "CLucene/document/DateField.h" 00012 CL_CLASS_DEF(index,Term) 00013 //#include "CLucene/index/Terms.h" 00014 //#include "CLucene/index/IndexReader.h" 00015 //#include "CLucene/util/BitSet.h" 00016 #include "Filter.h" 00017 00018 CL_NS_DEF(search) 00019 00020 class CLUCENE_EXPORT RangeFilter: public Filter 00021 { 00022 private: 00023 const TCHAR* field; 00024 TCHAR* lowerValue; 00025 TCHAR* upperValue; 00026 bool includeLower; 00027 bool includeUpper; 00028 00029 protected: 00030 RangeFilter( const RangeFilter& copy ); 00031 00032 public: 00033 RangeFilter( const TCHAR* fieldName, const TCHAR* lowerValue, const TCHAR* upperValue, bool includeLower, bool includeUpper ); 00034 00035 static RangeFilter* Less( TCHAR* fieldName, TCHAR* upperTerm ); 00036 00037 static RangeFilter* More( TCHAR* fieldName, TCHAR* lowerTerm ); 00038 00039 ~RangeFilter(); 00040 00043 CL_NS(util)::BitSet* bits( CL_NS(index)::IndexReader* reader ); 00044 00045 Filter* clone() const; 00046 00047 TCHAR* toString(); 00048 }; 00049 00050 CL_NS_END 00051 #endif