Hi
I'm trying to index a decimal(8,2) field in MySQL.
I'm trying to do it like this in the model:
define_index do
indexes "cast(price as unsigned)", :as=> :sphinx_price, :sortable=>true
end
I rebuild the index and try to search, but nothing seems to work:
e=Event.search :with=>{:sphinx_price=>11}
e=Event.search "*a*" :with=>{:sphinx_price=>11}
I really want it to find a range, but this doesn't work either:
e=Event.search "*a*" :with=>{:sphinx_price=>1..1000}
They just return empty set, if i do a:
e=Event.search "*a*"
I get all the results I expect to.....
Any help would be much appreciated :)
Thanks
Jon
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.