对于fecshop的配置,打开文件 @fecshop/config/components/xunSearch.php 可以看到
return [
'xunsearch' => [
'class' => 'hightman\xunsearch\Connection', // 此行必须
'iniDirectory' => '@fecshop/config/xunsearch', // 搜索 ini 文件目录,默认:@vendor/hightman/xunsearch/app
'charset' => 'utf-8', // 指定项目使用的默认编码,默认即时 utf-8,可不指定
],
iniDirectory
指明init文件路径为:@fecshop/config/xunsearch
,进入这个文件夹可以发现文件
@fecshop/config/xunsearch/search.ini
,
关于search.ini
的内容以及解读参看:http://www.fecshop.com/topic/1504
这个是fecshop的对于xunsearch的配置文件,如果你想要自定义,那么,在本地config文件重写这个xunsearch components配置
譬如新建文件 @common/config/xunsearch/search.ini,然后在配置文件 @common/config/fecshop_local.php文件中添加配置
在return数组中添加 xunsearch components的配置,这个会覆盖fecshop的默认配置
return [
'modules' => $modules,
'services' => $services,
'components' => [
'xunsearch' => [
'iniDirectory' => '@common/config/xunsearch', // 搜索 ini 文件目录,默认:@vendor/hightman/xunsearch/app
],
]
];
然后在文件 @common/config/xunsearch/search.ini 中添加你的xunsearch配置就可以了。