SQLSTATE [42000]:语法错误或访问冲突:1584对存储函数“ sphinx_snippets”的调用中的参数不正确

时间:2018-12-23 08:36:17

标签: sql laravel sphinx

在我的Laravel脚本中使用狮身人面像搜索单词会返回此错误:

SQLSTATE[42000]: Syntax error or access violation: 1584 Incorrect parameters in the call to stored function 'sphinx_snippets' (SQL: select articles.*, sphinx_snippets(articles.title, 'articles', 'dff', 280 AS `limit`, 8 AS around, '<span class="highlight">' AS before_match, '</span>' AS after_match) as title_snippet, sphinx_snippets(articles.abstract, 'articles', 'dff', 280 AS `limit`, 8 AS around, '<span class="highlight">' AS before_match, '</span>' AS after_match) as abstract_snippet from `articles_index` inner join `articles` on `articles_index`.`id` = `articles`.`id` where articles_index.query = '@* dff;sort=relevance;fieldweights=title,2,abstract,1,keywords,10;mode=extended;offset=0;
limit=25')

解决方案是什么。
我也通过终端

在mysql中运行此代码
select articles.*, sphinx_snippets(articles.title, 'articles', 'dff') as title_snippet from articles;

出现错误:

错误1305(42000):功能database_name.sphinx_snippets不存在

0 个答案:

没有答案