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 #ifndef _lucene_search_DateFilter_ 00008 #define _lucene_search_DateFilter_ 00009 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 00021 // Deprecated. Instead, use RangeFilter combined with DateTools. 00022 00023 00024 00030 class CLUCENE_EXPORT DateFilter: public Filter { 00031 private: 00032 CL_NS(index)::Term* start; 00033 CL_NS(index)::Term* end; 00034 00035 protected: 00036 DateFilter(const DateFilter& copy); 00037 public: 00038 ~DateFilter(); 00039 00042 DateFilter(const TCHAR* f, int64_t from, int64_t to); 00043 00046 static DateFilter* Before(const TCHAR* field, int64_t time) ; 00047 00050 static DateFilter* After(const TCHAR* field, int64_t time) ; 00051 00054 CL_NS(util)::BitSet* bits(CL_NS(index)::IndexReader* reader) ; 00055 00056 Filter* clone() const; 00057 00058 TCHAR* toString(); 00059 }; 00060 CL_NS_END 00061 #endif