使用Sphinx的SNIPPET()功能,如何从查询中删除任何before_match
和after_match
?我不希望任何东西缠绕在匹配的文本上。
SNIPPET(field, 'word', 'after_match=""', 'before_match=""')
我已尝试过after_match=""
,但这会为比赛添加文字引号。
我已经尝试了after_match=''"
,但这失败了
我已经尝试了after_match=
,但这也失败了
有什么建议吗?
答案 0 :(得分:2)
我唯一的建议是将它设置为一些无害的字符串,然后在帖子中删除。 'after_match=*'
然后可以做<?php $str = str_replace('*','',$str);
种事情。
或者只使用strip_tags
样式功能删除自动
<b>...</b>
:)