I am struggling with trying to geo search an asssociated model.  My
relevant code is here: http://www.pastie.org/790850

The context is that I have a business model and an address model.  I
want to be able to search for items in the business model that match
certain criteria (like the name or description) and fall within n
miles of a point the user enters.  If I search via the Address model,
this works, but then I can't get it to search all the attributes of
the model model.  If I search via the Business model, then I can't get
the geo search to work (which is most likely because I am doing it
wrong).  Is there a way to do this?

I also want to be able to search web_only businesses (which is defined
via a sphinx_scope in the address model).  Basically a web_only
business is a business where it's address has a website_only=1 in the
SQL.  I also don't want businesses with website_only=1 returned in the
geo query even if they have a lat/lng associated with them (hence the
scope).  But when I put the scope in, Rails throws a no method error.
Is there anything in the code that jumps out at anyone? Thanks in
advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to thinking-sph...@googlegroups.com.
To unsubscribe from this group, send email to 
thinking-sphinx+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to