views:

18

answers:

2

I have a music collection and use sphinx for searching in it. Search mode is SPH_MATCH_PHRASE, but when I search f.e. for "B'Day" album - sphinx cuts "'" and searching by "Day" query. How can I force sphinx to search by exact phrase without filtering any symbols?

A: 

I set param min_word_len = 1 in index config and it works well!

YS-PRO
+1  A: 

You need to make sure that char ' is treated by sphinx as a word character.

In order to do this, you need to specify the list of word characters in charset_table

For example:

# treats all english characters and ' as word characters 
charset_table = 0..9, A..Z->a..z, _, a..z,'

After that you'll need to rebuild the index and restart searchd.

See http://www.sphinxsearch.com/docs/current.html#conf-charset-table

Andriy Bohdan