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

API Documentation


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

firtex::collection::CCollection类参考

#include <Collection.h>

继承图,类firtex::collection::CCollection

firtex::collection::CDirCollection firtex::collection::CFileListCollection firtex::collection::CFirteXCollection firtex::collection::CTrecCollection 所有成员的列表。

公有成员

 CCollection (void)
 CCollection (CIndexWriter *pIndexWriter)
virtual ~CCollection (void)
void attachWriter (CIndexWriter *pWriter)
CIndexWriterdetachWriter ()
void setTerminate (bool bTerminate=true)
bool isTerminate ()
void setModifiedDate (const tchar *field=_T("modified"), bool bStore=true, bool bIndex=true)
bool isIndexModifiedDate ()
schemaid_t getModifiedDateSchemaId ()
CIndexParametergetIndexParameter ()
virtual tstring getCategory ()
virtual tstring getIdentifier ()
bool scan ()
virtual bool addFile (const tchar *filename)
virtual void close ()

静态公有属性

const tstring category
const tstring identifier

保护成员

virtual bool scanInternal ()=0

保护属性

CIndexWriterm_pIndexWriter
CIndexParameterm_pIndexParameter
bool m_bTerminate
tstring m_identifier
schemaid_t m_modifiedDateSchemaId

详细描述

待索引文档集合的抽象基类,可以是一个存放待索引文件的目录,一个File List文件 或一个索引文集集合的内存块 对于不同的待索引文件目录可以实现不同的Collection对象


构造及析构函数文档

firtex::collection::CCollection::CCollection void   ) 
 

firtex::collection::CCollection::CCollection CIndexWriter pIndexWriter  ) 
 

构造函数

参数:
pIndexWriter 外部提供的Index Writer, 作为内部对象,由内部负责删除 内部对象,外部不能删除

virtual firtex::collection::CCollection::~CCollection void   )  [virtual]
 


成员函数文档

virtual bool firtex::collection::CCollection::addFile const tchar *  filename  )  [inline, virtual]
 

添加单个文件进行索引

firtex::collection::CDirCollectionfirtex::collection::CFileListCollection重载。

void firtex::collection::CCollection::attachWriter CIndexWriter pWriter  ) 
 

关联一个Index Writer,如果已经关联则自动销毁已有的Writer

参数:
pWriter wirter对象,关联后pWriter即成为内部对象,由内部删除

virtual void firtex::collection::CCollection::close  )  [virtual]
 

关闭Collection,释放资源

firtex::collection::CFileListCollection重载。

CIndexWriter* firtex::collection::CCollection::detachWriter  ) 
 

撤销Collection关联的Index Writer

返回:
撤销关联后的Index Writer对象 撤销关联后即为非内部对象,需外部删除

virtual tstring firtex::collection::CCollection::getCategory  )  [inline, virtual]
 

获取parser的所属分类,对于parser总是返回"parser"

virtual tstring firtex::collection::CCollection::getIdentifier  )  [inline, virtual]
 

返回parser的标识

CIndexParameter * firtex::collection::CCollection::getIndexParameter  )  [inline]
 

获取Index Parameter

返回:
Index Parameter对象 内部对象,外部不能删除

schemaid_t firtex::collection::CCollection::getModifiedDateSchemaId  )  [inline]
 

bool firtex::collection::CCollection::isIndexModifiedDate  )  [inline]
 

判断是否索引文件时间

bool firtex::collection::CCollection::isTerminate  )  [inline]
 

判断是否设置终止标志

返回:
true 是 false 否

bool firtex::collection::CCollection::scan  ) 
 

扫描处理文档集

virtual bool firtex::collection::CCollection::scanInternal  )  [protected, pure virtual]
 

扫描处理文档集,子类实现,一般从文档集中抽取出单个文档,交给CIndexWriter对象处理

firtex::collection::CDirCollectionfirtex::collection::CFileListCollectionfirtex::collection::CFirteXCollectionfirtex::collection::CTrecCollection内被实现。

void firtex::collection::CCollection::setModifiedDate const tchar *  field = _T("modified"),
bool  bStore = true,
bool  bIndex = true
 

设置索引文件时间,如果bStorebIndex均为false,则不建立文件时间索引

参数:
field 时间字段名
bStore 是否存储
bIndex 是否索引

void firtex::collection::CCollection::setTerminate bool  bTerminate = true  )  [inline]
 

设置终止标志,在多线程环境下可以优雅地终止索引

参数:
bTerminate 设置或清除终止标志


成员数据文档

const tstring firtex::collection::CCollection::category [static]
 

const tstring firtex::collection::CCollection::identifier [static]
 

firtex::collection::CDirCollectionfirtex::collection::CFileListCollectionfirtex::collection::CFirteXCollectionfirtex::collection::CTrecCollection重载。

bool firtex::collection::CCollection::m_bTerminate [protected]
 

tstring firtex::collection::CCollection::m_identifier [protected]
 

schemaid_t firtex::collection::CCollection::m_modifiedDateSchemaId [protected]
 

CIndexParameter* firtex::collection::CCollection::m_pIndexParameter [protected]
 

CIndexWriter* firtex::collection::CCollection::m_pIndexWriter [protected]
 


该类的文档由以下文件生成:

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