Ok, I included has city_id and it now works. Is this the fix? On Aug 31, 12:12 pm, Christian Fazzini <[email protected]> wrote: > Hi Allan. Here it is: > > define_index do > indexes title, :sortable => true > indexes description > indexes [user.first_name, user.last_name], :as => :full_name > > has created_at > end > > On Aug 31, 12:06 pm, Pat Allan <[email protected]> wrote: > > > Hi Christian > > > In your Deal model, you should have a define_index block which defines > > fields and attributes - can you share that block of code? > > > Cheers > > > -- > > Pat > > > On 31/08/2010, at 12:54 PM, Christian Fazzini <[email protected] > > > > wrote: > > > Define index block where? My action? > > > > Im doing the above commands in console. Which should only return one > > > result, but it isnt > > > > On Aug 31, 10:23 am, Pat Allan <[email protected]> wrote: > > >> Hi Christian > > > >> What does your define index block look like? > > > >> -- > > >> Pat > > > >> On 31/08/2010, at 4:29 AM, Christian Fazzini > > >> <[email protected] > > > >> > wrote: > > >>> I tried searching by city_id 1 and I still get two results... It > > >>> should only return one result! > > > >>> Deal.search("month", :with => {:city_id => 1}) > > > >>> => [#<Deal id: 1, city_id: 1, user_id: 1, title: "$49 for One > > >>> Month of > > >>> Unlimited Dance Classes at Pau...", description: "Expires in 1 year. > > >>> Limit 1 per person, may buy mult...", price: 8589, value: 1231, > > >>> discount: 88, savings: 1000, goal: 50, countdown: "2010-08-18 > > >>> 17:23:09", purchased: 25, created_at: "2010-08-30 18:24:28", > > >>> updated_at: "2010-08-30 18:24:28">, #<Deal id: 2, city_id: 6, > > >>> user_id: > > >>> 1, title: "$49 for One Month of Unlimited Dance Classes at Pau...", > > >>> description: "Expires in 1 year. Limit 1 per person, may buy > > >>> mult...", > > >>> price: 8589, value: 1231, discount: 88, savings: 1000, goal: 50, > > >>> countdown: "2010-08-18 17:23:09", purchased: 25, created_at: > > >>> "2010-08-30 18:24:28", updated_at: "2010-08-30 18:24:28">] > > > >>> I also tried: > > > >>> Deal.search("month", :conditions => {:city_id => 1}) > > > >>> => [] > > > >>> I've already updated my index via: "rake thinking_sphinx:index". > > >>> What > > >>> is going on here? > > > >>> -- > > >>> 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 athttp://groups.google.com/ > > >>> group/thinking-sphinx?hl=en > > >>> . > > > > -- > > > 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 > > > athttp://groups.google.com/group/thinking-sphinx?hl=en > > > .
-- 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.
