FirteX-高性能全文索引和检索平台

API Documentation


首页 | 名字空间列表 | 类继承关系 | 组合类型列表 | $(BL\录(B | 文件列表 | 名字空间成员 | 组合类型成员 | 文件成员

MultiFieldTermReader.h

浏览该文件的文档。
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/11/20
00013 //
00014 #ifndef _MULTIFIELDTERMREADER_H
00015 #define _MULTIFIELDTERMREADER_H
00016 
00017 #include "../utility/StdHeader.h"
00018 #include "../utility/BitVector.h"
00019 #include "../store/Directory.h"
00020 #include "FieldsInfo.h"
00021 #include "TermReader.h"
00022 #include "Term.h"
00023 #include <map>
00024 using namespace std;
00025 using namespace firtex::store;
00026 
00027 namespace firtex
00028 {
00029         namespace index
00030         {
00031                 class CMultiFieldTermReader :   public CTermReader
00032                 {
00033                 public:
00034                         CMultiFieldTermReader(CDirectory* pDirectory,const tchar* barrelname,CFieldsInfo* pFieldsInfo,CBitVector* deletedDocs);
00035                         virtual ~CMultiFieldTermReader(void);
00036                 public:
00037                         void                    open(CDirectory* pDirectory,const tchar* barrelname,CFieldInfo* pFieldsInfo,CBitVector* deletedDocs);
00038                         
00046                         CTermIterator*  termIterator(CTerm* pLowerTerm,CTerm* pUpperTerm);
00047 
00054                         CTermIterator*  termIterator(const tchar* field);
00055 
00060                         bool                    seek(CTerm* term);
00061 
00066                         CTermDocs*              termDocs();
00067 
00072                         CTermPositions* termPositions();
00073 
00078                         freq_t                  docFreq(CTerm* term);
00079 
00085                         CTermInfo*              termInfo(CTerm* term);
00086 
00092                         CTermReader*    termReader(const tstring& field);
00093 
00097                         void                    close();
00098                 protected:
00099                         virtual void    open(CDirectory* pDirectory,const tchar* barrelname,CFieldsInfo* pFieldsInfo);
00100                 protected:
00101                         map<tstring,CTermReader*>       m_fieldsTermReaders;
00102                         CTermReader*                            m_curReader;
00103                         CBitVector*                                     m_deletedDocs;
00104                 };
00105         }
00106 }
00107 
00108 #endif

http://www.firtex.org http://www.sourceforge.net/projects/firtex