XunSearch的使用

一、项目的配置文件

1、要想使用xunsearch,首先需要进行配置文件的配置。

默认目录在app下,如下面的结构,每一个搜索项目都需要有一个ini文件进行相应的配置。

举例:

project.name = fine
project.default_charset = utf-8
server.index = 8383
server.search = 8384

[uid]
type = id

[subject]
type = title

[message]
type = body

[chrono]
type = numeric

注:每个字段用一个区段配置来表示,中括号内的名字即为字段名。每个项目包含若干个字段,具体由项目搜索需求决定,并不需要一味的与实际源数据库 (如 MYSQL) 一致,而只需要设计搜索功能所涉及的字段即可。

chm手册下载地址:http://www.xunsearch.com/site/download/xs_php_manual.chm

建议如果初次使用xunsearch,则从手册最开始跟着操作一遍。尤其是新手上路部分。

注:在线生成编辑配置文件ini http://www.xunsearch.com/tools/iniconfig

2、生成骨架文件【建议最好执行这步,节省很多开发时间】

http://www.xunsearch.com/doc/php/guide/util.skel

3 演示

地址:http://xun.xiaobudiu.top/demo/search.php

二、使用

猜你喜欢

转载自blog.csdn.net/m_nanle_xiaobudiu/article/details/81663636
今日推荐