views:

62

answers:

1

Hi,

I'm using Ultrasphinx with Aspell spelling support to search a Rails app. I want my users to be able to search using boolean operators ("king OR queen"). I'm using the german aspell directory, since the app is for Germany.

The Problem: Ultrasphinx always proposes corrections for the boolean OR ("did you mean 'king OHR queen'") which is kind of funny (Ohr means Ear) but also a little sad, because I don't know what to do against that.

Should I modify the stopwords list? (tried, but didn't work)

Should I add 'OR' to the Aspell directory? (How?)

Thanks for your help! Olaf

A: 

I don't know how Ultrasphinx works exactly but I guess you could replace OR with "|" which is the "or" operand for sphinxs' extended query syntax. Sames goes for "and" => "&". Not would require some additional code because you have to glue it with the adjacent word.

Bandito
Hi, thanks for the hint, but | isn't working.
ole_berlin