Alexei T
Alexei T

Reputation: 708

Sphinx don't match correct symbols

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'

Upvotes: 0

Views: 309

Answers (2)

Andrew
Andrew

Reputation: 12809

  • 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

Upvotes: 0

barryhunter
barryhunter

Reputation: 21091

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!)

Upvotes: 1

Related Questions