返回> 网站首页 

coreseek 在windows下的编译

yoours2011-03-13 18:24:28 阅读 1275

简介一边听听音乐,一边写写文章。

一、介绍
        Coreseek是一款基于Sphinx的开源检索引擎,支持Tb级的全文数据索引,专门为中文用户提供免费开源的中文全文检索系统。
        我们可以根据其提供的开源代码进行修改,使其更符合我们的搜索要求。

二、源代码编译
    sphinx.h 头文件定义
#define USE_MYSQL 0 /// whether to compile MySQL support
#define USE_PGSQL 0 /// whether to compile PgSQL support
#define USE_ODBC 0 /// whether to compile ODBC support
#define USE_LIBEXPAT 1 /// whether to compile libexpat support
#define USE_LIBICONV 1 /// whether to compile iconv support
#define USE_LIBXML 0 /// whether to compile libxml support
#define USE_LIBSTEMMER 0 /// whether to compile libstemmber support
#define USE_WINDOWS 1 /// whether to compile for Windows
#define USE_MMSEG 1 /// turn chinese segment on.
#define USE_CRFSEG 0 /// turn chinese segment on.
#define USE_PYTHON 1
#define USE_64BIT 0

        根据自己要求将不需要支持的项注释掉。

三、依赖项准备
    expat-2.0.1
    Python26
    libiconv-1.9.2-1-lib
    下载以上依赖库或exe安装程序,需要编译的自行编译。依赖项的编译比较简单,不用都编译只编译有关的工程即可。

四、编译
     打开VC++ 2008 设置依赖项的头文件路径,以及依赖的lib库的路径。
     在libsphinx工程中,加入 py_helper.cpp 、 py_layer.cpp 、 py_source.cpp 、 tokenizer_zhcn.cpp 、 sphinxutils.cpp 等文件,这些文件在源代码工程中已经存在,不知何原因没有被加入到工程。

    开始编译。

五、 结束

微信小程序扫码登陆

文章评论

1275人参与,0条评论