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,ruijieguo@gmail.com 00012 // Created : 2006/7/17 00013 // 00014 #ifndef _WORDFIELDTERMITERATOR_H 00015 #define _WORDFIELDTERMITERATOR_H 00016 00017 #if _MSC_VER > 1000 00018 #pragma once 00019 #endif // _MSC_VER > 1000 00020 00021 #include "../utility/StdHeader.h" 00022 #include "TermIterator.h" 00023 #include "Vocabulary.h" 00024 00025 00026 namespace firtex 00027 { 00028 namespace index 00029 { 00030 class CWordFieldTermIterator : public CTermIterator 00031 { 00032 public: 00033 CWordFieldTermIterator(const tchar* field,CVocabulary<termid_t>* pVocabulary); 00034 virtual ~CWordFieldTermIterator(void); 00035 public: 00040 bool next(); 00041 00047 bool skipTo(CTerm* target); 00048 00052 const CTerm* term(); 00053 00057 freq_t docFreq(); 00058 private: 00059 tstring m_field; 00060 CVocabulary<termid_t>* m_pVocabulary; 00061 CVocabulary<termid_t>::vacabulary_iterator m_termIterator; 00062 CTerm* m_pCurTerm; 00063 CTermInfo* m_pTermInfo; 00064 int32_t m_curPos; 00065 }; 00066 } 00067 } 00068 00069 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex