ultrasphinx icon indicating copy to clipboard operation
ultrasphinx copied to clipboard

facetted search on integer keys

Open jdwyah opened this issue 14 years ago • 0 comments

I wasn't able to get a facetted search to work on an integer key from one of my indexed objects. It looked like it should be valid to me and indeed, just changing the conditions that raise the error worked for me.

-thanks for the hard work

?> p search_hash = {:query => 'neur', :class_names => 'SearchableCondition', :per_page => 1000, :page =>1, :excerpt => true, :facets => :condition_id } {:excerpt=>true, :facets=>:condition_id, :per_page=>1000, :page=>1, :class_names=>"SearchableCondition", :query=>"neur"}

=> nil

Ultrasphinx::Search.new(search_hash).run.facets

Ultrasphinx::UsageError: Field condition_id does not exist from /Users/jdwyah/workspace/plm-website/.bundle/ruby/1.8/gems/ultrasphinx-1.11/lib/ultrasphinx/search/internals.rb:163:in `get_facets'

jdwyah avatar Dec 22 '10 17:12 jdwyah