How to search Dash-Character?

599 views
Skip to first unread message

ACTRAiSER

unread,
Sep 4, 2009, 6:50:33 AM9/4/09
to Thinking Sphinx
Hello there,

i have plenty of locations which have a dash in their name like "St
Leon-Rot" . If people search for 'Leon' or 'Rot' the location is
found, but "Leon-Rot" isn't. I think the Dash is interpreted as a word
seperator rather as part of the whole term.

What configuration is necessary to make sphinx "dash-aware" ?

Greets
-act

ACTRAiSER

unread,
Sep 4, 2009, 7:16:26 AM9/4/09
to Thinking Sphinx
For the sake of completeness... i found the ignore_chars-option in the
Sphinx-documentation but using a setup in my sphinx.yml like the
following does not help finding "Leon-Rot":

development:
max_matches: 100000
mem limit: 128M
enable_star: 1
min_prefix_len: 1
ignore_chars: U+AD

Greets
-act

Pat Allan

unread,
Sep 4, 2009, 9:22:35 AM9/4/09
to thinkin...@googlegroups.com
I think you'll want to add the character to your charset_table value
instead (don't forget to grab the default values for utf-8 to ensure
you don't overwrite that:
http://sphinxsearch.com/docs/manual-0.9.8.html#conf-charset-table
http://freelancing-god.github.com/ts/en/advanced_config.html (see the
last item on the page)

Cheers

--
Pat

Rocco Di Leo

unread,
Sep 4, 2009, 10:02:08 AM9/4/09
to thinkin...@googlegroups.com
Thanks Pat! This helped a lot!

Greets
-act

Thibaut Barrère

unread,
Sep 13, 2009, 1:39:57 PM9/13/09
to Thinking Sphinx
> What configuration is necessary to make sphinx "dash-aware" ?

I pasted my sphinx.yml extract here:

http://gist.github.com/186253

just followed the advices by Pat and Rocco - it took a bit of
searching to understand what was needed exactly, so here it is in case
it's useful to someone else.

Thibaut
--
http://www.learnivore.com
http://blog.logeek.fr
Reply all
Reply to author
Forward
0 new messages