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_WildcardQuery_ 00008 #define _lucene_search_WildcardQuery_ 00009 #if defined(_LUCENE_PRAGMA_ONCE) 00010 # pragma once 00011 #endif 00012 00013 #include "CLucene/index/IndexReader.h" 00014 #include "CLucene/index/Term.h" 00015 #include "MultiTermQuery.h" 00016 #include "WildcardTermEnum.h" 00017 00018 CL_NS_DEF(search) 00019 00020 00029 class WildcardQuery: public MultiTermQuery { 00030 protected: 00031 FilteredTermEnum* getEnum(CL_NS(index)::IndexReader* reader); 00032 WildcardQuery(const WildcardQuery& clone); 00033 public: 00034 WildcardQuery(CL_NS(index)::Term* term); 00035 ~WildcardQuery(); 00036 00037 //Returns the string "WildcardQuery" 00038 const TCHAR* getQueryName() const; 00039 static const TCHAR* getClassName(); 00040 00041 size_t hashCode() const; 00042 bool equals(Query* other) const; 00043 Query* clone() const; 00044 }; 00045 00046 00047 00048 class WildcardFilter: public Filter 00049 { 00050 private: 00051 CL_NS(index)::Term* term; 00052 protected: 00053 WildcardFilter( const WildcardFilter& copy ); 00054 00055 public: 00056 WildcardFilter(CL_NS(index)::Term* term); 00057 ~WildcardFilter(); 00058 00061 CL_NS(util)::BitSet* bits( CL_NS(index)::IndexReader* reader ); 00062 00063 Filter* clone() const; 00064 TCHAR* toString(); 00065 }; 00066 00067 00068 CL_NS_END 00069 #endif