Thanks! That was exactly the fix. Should have read your documentation a bit closer ;)
On Sep 28, 5:21 pm, Pat Allan <[email protected]> wrote: > Hi Mike > > For filters on attributes, you should use :with instead of :conditions (the > latter being just for fields). Also, if you're passing in a geo lat/lng, > you'll want to actually use it (sort or filter by @geodist). > > Cheers > > -- > Pat > > On 29/09/2011, at 4:47 AM, Mike Ackerman wrote: > > > > > > > > > I'm attempting to search using a scope with the following code: > > > define_index do > > join location > > > indexes tags(:text), :as => :tags > > > has user_id > > end > > > sphinx_scope(:by_location_and_user) { |loc, user| > > { > > :conditions => { 'user_id' => user.id}, > > :geo => [loc.lat.to_radians, loc.lng.to_radians] > > } > > > I think my syntax is just slightly wrong, but when trying to search > > like: > > MyModel.by_location_and_user(loc, current_user) > > I get: > > index request_core: query error: no field 'user_id' found in schema > > (ThinkingSphinx::SphinxError > > > Am I doing this close or completely wrong? > > > -- > > 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 > > athttp://groups.google.com/group/thinking-sphinx?hl=en. -- 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.
