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

API Documentation


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

WordFieldIndexer.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,ruijieguo@gmail.com
00012 // Created      : 2006/7/3
00013 //
00014 #ifndef _WORDFIELDINDEXER_H
00015 #define _WORDFIELDINDEXER_H
00016 
00017 #include "../utility/StdHeader.h"
00018 #include "FieldIndexer.h"
00019 #include "Posting.h"
00020 #include "Vocabulary.h"
00021 
00022 using namespace std;
00023 
00024 using namespace firtex;
00025 
00026 namespace firtex
00027 {
00028         namespace index
00029         {               
00030                 typedef CVocabulary<termid_t>   CHashVocabulary;
00031                 typedef CVocabulary<termid_t,CDynamicArrayBuilder<termid_t> >   CDynArrayWordVocabulary;
00032                 class CWordFieldIndexer :       public CFieldIndexer
00033                 {
00034                 public:
00035                         CWordFieldIndexer(CPosMemCache* pMemCache);
00036                         virtual ~CWordFieldIndexer(void);
00037                 public:         
00043                         void                    addField(docid_t did,CField* pField);
00044                         
00048                         void                    write(CIndexOutputDescriptor* pWriterDesc);
00049                         
00053                         void                    setFilePointer(fileoffset_t off){m_tdiFilePointer = off;};
00054                         fileoffset_t    getFilePointer(){return m_tdiFilePointer;};
00055 
00059                         uint64_t                distinctNumTerms();
00060                 protected:                      
00061                         //CHashVocabulary*      m_pVocabulary;
00062                         CDynArrayWordVocabulary*        m_pVocabulary;
00063                         
00064                         CPosMemCache*                   m_pMemCache;                    //内存缓冲
00065                         fileoffset_t                    m_tdiFilePointer;            
00066                 };
00067         }
00068 }
00069 
00070 
00071 #endif

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