在我的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')
解决方案是什么。
我也通过终端
select articles.*, sphinx_snippets(articles.title, 'articles', 'dff') as title_snippet from articles;
出现错误:
错误1305(42000):功能database_name.sphinx_snippets不存在