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 #if defined(_LUCENE_PRAGMA_ONCE) 00011 # pragma once 00012 #endif 00013 00014 #include "CLucene/document/DateField.h" 00015 #include "CLucene/index/Term.h" 00016 #include "CLucene/index/Terms.h" 00017 #include "CLucene/index/IndexReader.h" 00018 #include "CLucene/util/BitSet.h" 00019 #include "Filter.h" 00020 00021 CL_NS_DEF(search) 00028 class DateFilter: public Filter { 00029 private: 00030 CL_NS(index)::Term* start; 00031 CL_NS(index)::Term* end; 00032 00033 protected: 00034 DateFilter(const DateFilter& copy); 00035 public: 00036 ~DateFilter(); 00037 00040 DateFilter(const TCHAR* f, int64_t from, int64_t to); 00041 00044 static DateFilter* Before(const TCHAR* field, int64_t time) ; 00045 00048 static DateFilter* After(const TCHAR* field, int64_t time) ; 00049 00052 CL_NS(util)::BitSet* bits(CL_NS(index)::IndexReader* reader) ; 00053 00054 Filter* clone() const; 00055 00056 TCHAR* toString(); 00057 }; 00058 CL_NS_END 00059 #endif