讯搜后台管理
{$stats.total_vod}
数据库视频总数
{$stats.total_index}
索引数据总数
{if $stats.last_update}{:is_numeric($stats.last_update) ? date('Y-m-d H:i:s', (int)$stats.last_update) : $stats.last_update}{else/}未索引{/if}
最后索引时间
{if $stats.server_status == 'connected'}已连接{else/}{$stats.server_status}{/if}
服务器状态
索引管理
宝塔计划任务设置

您可以在宝塔面板中创建计划任务,自动执行索引更新:

1. 全量重建计划任务(每天凌晨执行)

任务类型:访问URL

执行周期:每天 02:00

URL地址:

http://你的域名/index.php/addons/xunsearch/admin/rebuild

2. 增量更新计划任务(每小时执行)

任务类型:访问URL

执行周期:每小时

URL地址:

http://你的域名/index.php/addons/xunsearch/admin/update
搜索测试
API 接口说明

1. TVBox 搜索接口

用途:供 TVBox 等播放器搜索使用

地址

/index.php/addons/xunsearch/admin/tvbox?wd=关键词&page=1

返回格式:JSON

示例

{"code":1,"msg":"搜索成功","data":{"list":[...],"total":100,"page":1,"pagecount":5}}

2. APP 搜索接口

用途:供移动端 APP 搜索使用,支持 JSONP

地址

/index.php/addons/xunsearch/admin/api?wd=关键词&page=1&limit=20

JSONP 支持

/index.php/addons/xunsearch/admin/api?wd=关键词&page=1&callback=callbackName

返回格式:JSON / JSONP

3. 前台搜索接口

用途:供 PC/H5 前台页面搜索使用

地址

/index.php/addons/xunsearch/index/search?wd=关键词&page=1

返回格式:HTML 页面

{literal} {/literal}