Hey team!
here is the scenario..
I have a Restaurant model and HABTM to Cuisine Model.. here are the console
queries..
r = Restaurant.find 18405
r.cuisine_ids
=> [3, 9, 1, 4, 2, 23, 36, 24, 25, 30, 32, 38, 39, 37, 10, 8, 12]
r.cuisines.pluck(:name).join(",")
=> "North West Frontier,Oriental,North Indian,Mughlai,Punjabi,South
Indian,Bengali,Chettinad,Hyderabadi,Coastal,Konkani,Gujarati,Rajasthani,Maharashtrian,Thai,Malaysian,Vietnamese"
Now if i search for the 8th cuisine.. i get results fine.. but if i search
for 9th cuisine.. no results..
here is the query log
[Wed May 29 04:11:17.536 2013] 0.001 sec [ext2/1/ext 0 (0,10)]
[restaurant_core] @cuisine (Hyderabadi) @city (Bangalore) @locality (St.
John's Road) @sphinx_internal_class_name (Restaurant)
[Wed May 29 04:12:17.289 2013] 0.002 sec [ext2/1/ext 1 (0,10)]
[restaurant_core] @cuisine (Chettinad) @city (Bangalore) @locality (St.
John's Road) @sphinx_internal_class_name (Restaurant)
the 8th/9th is not consistent number.. usually depends on the characters in
the cuisines before that.. i am assuming the indexes are getting cut off
somewhere..
also If i just remove all the cuisines from the restaurant and just add
Hyderabadi.. i can search for it.. so it looks like it has to do with the
number os cuisines or the length of the index.. I doubt this has anything
to do with pagination..
here is the Index definition
ThinkingSphinx::Index.define :restaurant, :with => :active_record do
indexes :name, description, :sortable => true
indexes cuisines.name, :as => :cuisine
end
any ideas on how to debug and/or fix this?
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.