Pab
2011-Dec-12 13:04 UTC
how to get data from following format #<ActsAsSolr::SearchResults:0xb379438 @solr_data={:docs=>[{"id"=>"6.152049"}, {"id"=>"1.2989831"}, {"id"=>"1.2989831"}], :total=>3}>
hi, i would like to know how to extract value from following format which is from act as solr multi search StoreProductUpc.multi_solr_search @query,:models => [SalProduct],:results_format => :ids below is the result came from multisearch how can i get actual id : 16399,16400 and 30504 instead for {"id"=>"6.152049"}, {"id"=>"1.2989831"}, {"id"=>"1.2989831"} #<ActsAsSolr::SearchResults:0xb379438 @solr_data={:docs=>[{"id"=>"6.152049"}, {"id"=>"1.2989831"}, {"id"=>"1.2989831"}], :total=>3}> could any one provide me the solution thanks, -pab -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jim Ruther Nill
2011-Dec-12 13:16 UTC
Re: how to get data from following format #<ActsAsSolr::SearchResults:0xb379438 @solr_data={:docs=>[{"id"=>"6.152049"}, {"id"=>"1.2989831"}, {"id"=>"1.2989831"}], :total=>3}>
On Mon, Dec 12, 2011 at 9:04 PM, Pab <prabu.net88-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hi, > > i would like to know how to extract value from following format > which is from act as solr > multi search > > StoreProductUpc.multi_solr_search @query,:models => > [SalProduct],:results_format => :ids > > > below is the result came from multisearch how can i get actual id : > 16399,16400 and 30504 instead for {"id"=>"6.152049"}, > {"id"=>"1.2989831"}, {"id"=>"1.2989831"} > > #<ActsAsSolr::SearchResults:0xb379438 > @solr_data={:docs=>[{"id"=>"6.152049"}, {"id"=>"1.2989831"}, > {"id"=>"1.2989831"}], :total=>3}> > >look at this http://stackoverflow.com/questions/2007495/actsassolrsearchresults could any one provide me the solution> > > thanks, > -pab > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.