FirteX-高性能全文索引和检索平台API Documentation |
00001 // 00002 // Copyright(C) 2005--2006 Institute of Computing Tech, Chinese Academy of Sciences. 00003 // All rights reserved. 00004 // This file is part of FirteX (www.firtex.org) 00005 // 00006 // Use of the FirteX is subject to the terms of the software license set forth in 00007 // the LICENSE file included with this software, and also available at 00008 // http://www.firtex.org/license.html 00009 // 00010 // Author : 郭瑞杰(GuoRuijie) 00011 // Email : ruijieguo@software.ict.ac.cn 00012 // Created : 2005/12/27 00013 // 00014 #ifndef __TERMSEARCHER_H 00015 #define __TERMSEARCHER_H 00016 #include "../utility/StdHeader.h" 00017 #include "Term.h" 00018 #include "TermDocs.h" 00019 #include "TermPositions.h" 00020 #include "TermInfo.h" 00021 #include "TermIterator.h" 00022 #include "../store/Directory.h" 00023 #include "../utility/BitVector.h" 00024 #include "FieldsInfo.h" 00025 #include <string> 00026 using namespace firtex::store; 00027 using namespace firtex::utility; 00028 using namespace std; 00029 00030 namespace firtex 00031 { 00032 namespace index 00033 { 00034 class CTermReader 00035 { 00036 public: 00037 00038 CTermReader(void) 00039 { 00040 } 00041 00042 virtual ~CTermReader(void) 00043 { 00044 } 00045 public: 00053 virtual void open(CDirectory* pDirectory,const tchar* barrelname,CFieldInfo* pFieldInfo,CBitVector* deletedDocs)=0; 00054 00062 virtual CTermIterator* termIterator(CTerm* pLowerTerm,CTerm* pUpperTerm) = 0; 00063 00070 virtual CTermIterator* termIterator(const tchar* field) = 0; 00071 00076 virtual bool seek(CTerm* term)=0; 00077 00082 virtual CTermDocs* termDocs() = 0; 00083 00088 virtual CTermPositions* termPositions()=0; 00089 00094 virtual freq_t docFreq(CTerm* term) = 0; 00095 00100 virtual CTermInfo* termInfo(CTerm* term){return NULL;}; 00101 00105 virtual void close()=0; 00106 }; 00107 } 00108 } 00109 00110 00111 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex