How can I index and search on the percent (%) character in sphinx

622 Views Asked by At

Our index is full of data that have associated units with them.

Units such as degrees (°) and percent (%) are proving difficult to index and search on.

We're using ultrasphinx and sphinx 0.9.9 but Riddle/ThinkingSphinx doesn't seem to handle searching on the % sign.

We allow setting a unit label and unit symbol which we construct a unit string from which is indexed.

Unit strings such as "Power (W)" can be found using a query such as

@units "W"
1

There are 1 best solutions below

0
On BEST ANSWER

Try adding it to your charset table like in: https://stackoverflow.com/a/8640248/960702