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 : 2006/7/3 00013 // 00014 #ifndef _TERMSEQUENCEVECTOR_H 00015 #define _TERMSEQUENCEVECTOR_H 00016 00017 #if _MSC_VER > 1000 00018 #pragma once 00019 #endif // _MSC_VER > 1000 00020 00021 #include "../utility/StdHeader.h" 00022 #include "../utility/FXString.h" 00023 #include "../store/IndexOutput.h" 00024 #include "../store/IndexInput.h" 00025 #include "../document/Field.h" 00026 00027 using namespace firtex::store; 00028 using namespace firtex::document; 00029 00030 namespace firtex 00031 { 00032 namespace index 00033 { 00034 class CTermSequenceVector 00035 { 00036 public: 00037 00038 CTermSequenceVector() 00039 { 00040 } 00041 CTermSequenceVector(const tchar* field) : m_field(field) 00042 { 00043 } 00044 virtual ~CTermSequenceVector(void) 00045 { 00046 } 00047 public: 00048 00054 virtual void open(const tchar* field,CIndexInput* pInput) = 0; 00058 virtual const tchar* getField(){return m_field.c_str();} 00059 00063 virtual count_t numTerms() = 0; 00064 00070 virtual const termid_t* getTermIDs() = 0; 00071 protected: 00077 virtual void addField(CIndexOutput* pOutput,CField* pField) = 0; 00078 protected: 00079 CFXString m_field; 00080 00081 friend class CTermVectorWriter; 00082 }; 00083 } 00084 } 00085 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex