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/10 00013 // 00014 #ifndef _FIELDINDEXER_H 00015 #define _FIELDINDEXER_H 00016 00017 #include "../utility/StdHeader.h" 00018 #include "../document/Field.h" 00019 #include "../store/IndexOutput.h" 00020 00021 using namespace firtex; 00022 using namespace firtex::store; 00023 using namespace firtex::document; 00024 00025 namespace firtex 00026 { 00027 namespace index 00028 { 00029 class CIndexOutputDescriptor 00030 { 00031 public: 00032 CIndexOutputDescriptor(){} 00033 virtual ~CIndexOutputDescriptor(){} 00034 public: 00035 CIndexOutput* tdiWriter; 00036 CIndexOutput* dfiWriter; 00037 CIndexOutput* ptiWriter; 00038 00039 friend class CFieldIndexer; 00040 }; 00041 00042 class CFieldIndexer 00043 { 00044 public: 00045 00046 CFieldIndexer(void) 00047 { 00048 } 00049 00050 virtual ~CFieldIndexer(void) 00051 { 00052 } 00053 public: 00059 virtual void addField(docid_t did,CField* pField) = 0; 00060 00067 virtual void write(CIndexOutputDescriptor* pWriterDesc) = 0; 00068 00073 virtual void setFilePointer(fileoffset_t off) = 0; 00074 00078 virtual fileoffset_t getFilePointer() = 0; 00079 00083 virtual uint64_t distinctNumTerms() = 0; 00084 }; 00085 } 00086 } 00087 00088 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex