试图在狮身人面像中逃脱逗号无济于事

Trying to escape comma in sphinx to no avail

我不想创建 char_set table 因为我不知道我可能会打开什么样的蠕虫我只想针对一个特定的查询搜索逗号。事实上,当有逗号时,我正在尝试做一个 'NOT',我试过

Select Title from idx where MATCH('Word !"\,Word"')
Select Title from idx where MATCH('Word !"\,Word"')
Select Title from idx where MATCH('Word !"\,\Word"')
Select Title from idx where MATCH('Word !"\,\Word"')

但在每种情况下,它都将其视为我刚刚处理过的

Select Title from idx where MATCH('Word !"Word"')

您将需要charset_table添加逗号——如果不这样做,逗号在索引过程中被删除——所以查询不能 根据 记录的内容采取行动。

(尽管您也许可以使用 regexp_filter 将逗号替换为字符集 table 中的其他内容。但是由于字符不多,您可能需要将其替换为唯一的词。)