I am using Sphinx with the Thinking Sphinx plugin. I have indexed a model called Venue with the following code (and the rake thinking_sphinx:index command)
define_index do
indexes :name
indexes city
indexes zip
end
I obtain the results in my controller with this code:
@venues = Venue.search params[:search]
and I render them as json. The problem I have is that when I hit this URL:
http://localhost:3000/venue/list?search=Baltimo
I get nothing. But when I hit this URL:
http://localhost:3000/venue/list?search=Baltimor
I get all Venues located in the city of Baltimore. For some reason that one character makes a difference. Theoretically, I should be getting all Venues in Baltimore if I just search with one character - 'b'
Does anyone know what is going on here?
Thank you