0

这是我的查询 Sphinxql 查询

$query =SphinxQL::query()->select('*')
    ->from('table1')->match('title','hel',)->execute();

  //title is  column name

我需要一个在hel任何地方都有文本的记录for eg mysql Like %string%

在上面检索与hel单词匹配的记录

我需要添加setmatchmode(SPH_MATCH_ANY)我需要添加的地方这是Sphinxql查询

4

1 回答 1

3

坦率地说,你最好不要使用匹配模式,即使你通过 SphinxQL 在技术上是可能的。

相反,只需使用 quorum 语法重写查询......

->match('title',expr('"hel two there"/1'))

编辑澄清可能需要使用表达式来避免框架提供的自动转义。(感谢评论!)

于 2014-05-19T08:12:59.933 回答