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_Filter_ 00008 #define _lucene_search_Filter_ 00009 00010 CL_CLASS_DEF(util,BitSet) 00011 CL_CLASS_DEF(index,IndexReader) 00012 00013 CL_NS_DEF(search) 00014 // Abstract base class providing a mechanism to restrict searches to a subset 00015 // of an index. 00016 class CLUCENE_EXPORT Filter: LUCENE_BASE { 00017 public: 00018 virtual ~Filter(){ 00019 } 00020 00021 virtual Filter* clone() const = 0; 00022 00028 virtual CL_NS(util)::BitSet* bits(CL_NS(index)::IndexReader* reader)=0; 00029 00036 virtual bool shouldDeleteBitSet(const CL_NS(util)::BitSet* bs) const{ return true; } 00037 00038 //Creates a user-readable version of this query and returns it as as string 00039 virtual TCHAR* toString()=0; 00040 }; 00041 CL_NS_END 00042 #endif