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 at
http://groups.google.com/group/thinking-sphinx?hl=en.