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

API Documentation


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

IndexBarrelReader.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/12/27
00013 //
00014 
00015 #ifndef _INDEXBARRELREADER_H
00016 #define _INDEXBARRELREADER_H
00017 #include "../utility/StdHeader.h"
00018 #include "FieldsInfo.h"
00019 #include "StoredFieldsReader.h"
00020 #include "Term.h"
00021 #include "TermDocs.h"
00022 #include "TermPositions.h"
00023 #include "FieldIndexer.h"
00024 #include "FieldsInfo.h"
00025 #include "../store/Directory.h"
00026 #include "../document/Document.h"
00027 #include "../document/Field.h"
00028 #include "TermVectorReader.h"
00029 
00030 #include <map>
00031 
00032 using namespace std;
00033 using namespace firtex;
00034 using namespace firtex::store;
00035 
00036 
00037 namespace firtex
00038 {
00039         namespace index
00040         {
00041                 class CTermReader;
00042                 class CNormBytes;
00043                 class CIndexBarrelReader
00044                 {
00045                 public:
00046                         CIndexBarrelReader(CDirectory* pDirectory):m_pDirectory(pDirectory)
00047                         {
00048 
00049                         }
00050                         virtual ~CIndexBarrelReader(void)
00051                         {
00052                                 m_pDirectory = NULL;
00053                         }
00054                 public:
00060                         virtual void    open(const tchar* name) = 0;
00061 
00067                         virtual document::CDocument*    document(docid_t docID) = 0;
00068 
00076                         virtual document::CField*               field(docid_t docID,fieldid_t fid) = 0;
00077 
00082                         virtual void    deleteDocument(docid_t docID) = 0;
00083 
00087                         virtual void    undeleteAll() = 0;
00088 
00093                         virtual bool    isDeleted(docid_t docID) = 0;
00094 
00098                         virtual bool    hasDeletions() = 0;
00099 
00103                         virtual count_t numDeletedDocs() = 0;
00104 
00109                         virtual CTermReader*    termReader() = 0;
00110 
00116                         virtual CTermVectorReader*      getTermVectorReader() = 0;
00117 
00122                         virtual CNormBytes*             norms(const tchar* field) = 0;
00123 
00128                         virtual CNormBytes*             norms(fieldid_t fid) = 0;
00129 
00133                         virtual uint64_t                numTerms() = 0;
00134 
00138                         virtual CFieldsInfo&    getFieldsInfo() = 0;
00139 
00143                         virtual void                    close() = 0;
00144                 protected:
00145                         CDirectory*                             m_pDirectory;                   
00146                 };
00147         }
00148 }
00149 
00150 #endif

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