I have two models, e.g. like this:
City
Street
Where a city has many streets.
I built a search method on the city model, like this:
define_index do
indexes :name
indexes streets.name, :as => :street_name
set_property :min_infix_len => 1
end
In the controller:
City.search :params[:search]
The user can search either by city or by street name. The search works
fine, but because it just returns a City object, I'm unable to figure
out which Street object was matched. How do I find it?
I can't use excerpts to figure it out, because - see my previous post
- they don't work for partial matches and they also don't seem to work
if the match is not in the primary model.
Thanks,
Sjors
--
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.