Sphinx与正确的符号不匹配

问题描述:

I have a problem with sphinx search For example the query is 'C++'

For this query I get results that match 'C' but I need sphinx to search exact 'C++' not 'C'

我的sphinx搜索有问题 例如查询是'C ++' p>

对于此查询,我得到的结果与'C'匹配,但我需要sphinx来搜索'C ++'而不是'C' p> div>

Check your charset_table, http://sphinxsearch.com/docs/current.html#conf-charset-table

Suspect you dont have + in your charset_table, so it isnt been indexed.

Or if you just want to deal with specific cases (like c++) and not all cases of that char (like 1+2), then look at adding an exception for c++ http://sphinxsearch.com/docs/current.html#conf-exceptions (its even in the example!)

  • is an arithmetic character and will not be matched

You should look at exceptions to around this issue:

http://sphinxsearch.com/docs/1.10/conf-exceptions.html

C++ => cplusplus
c++ => cplusplus