From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.142.125.10 with SMTP id x10cs67266wfc; Thu, 9 Jun 2011 07:09:08 -0700 (PDT) Received: by 10.52.94.170 with SMTP id dd10mr1100824vdb.159.1307628547691; Thu, 09 Jun 2011 07:09:07 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id eu5si2250819vdb.23.2011.06.09.07.09.07; Thu, 09 Jun 2011 07:09:07 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 3B5F918583DA for ; Thu, 9 Jun 2011 10:09:07 -0400 (EDT) Received: from mail-vx0-f178.google.com (mail-vx0-f178.google.com [209.85.220.178]) by rubyforge.org (Postfix) with ESMTP id 52C6A18583CB for ; Thu, 9 Jun 2011 10:08:56 -0400 (EDT) Received: by vxc11 with SMTP id 11so1632160vxc.23 for ; Thu, 09 Jun 2011 07:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=ymhsbzZJKUPWANwI+IVw40gXFnpc6a5F6tn9YfRQ3ZI=; b=DcBl1+Po+iI0Qolx7G9Aoqq984MC29OQ8nPwFRp27ZAFvuTlLFGgchReLy4VUK5cfn uWW37lDaB1CEEIDbMqMGrY1t6fi62oHEVjddL+DMQiRNRDPaMMyoy/sm0w/Wm+zVUTjV jEbtF4/g4l+hWxyvKvwjw3TVqiCHmPqYGJ6Iw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VOBq20C1fBVG1K3gU8J18mRoz6OhgoG/4seJmX8kFWugEEUdbWWmw7YCiDOox1KubU Tx39nLLN4jHaN2Hk5eomZ16Nt/GiUmxeOgnuMSbCjtLACZSr0b5Q9rK/O4BDYhBx4VQ0 w5OVx6oXBWnxqvaSTUuGnyQ2wFybm8MGN41iY= MIME-Version: 1.0 Received: by 10.52.96.134 with SMTP id ds6mr1132682vdb.27.1307628536386; Thu, 09 Jun 2011 07:08:56 -0700 (PDT) Received: by 10.52.184.225 with HTTP; Thu, 9 Jun 2011 07:08:56 -0700 (PDT) In-Reply-To: References: <201104251023.19659.hsanson@gmail.com> <1303793294-sup-688@masanjin.net> <1304052708-sup-4240@masanjin.net> <1304460745-sup-6241@masanjin.net> <1304527268-sup-7661@masanjin.net> <1307509658-sup-6995@masanjin.net> Date: Thu, 9 Jun 2011 23:08:56 +0900 Message-ID: From: Horacio Sanson To: Sup developer discussion Subject: Re: [sup-devel] Cannot query Japanese characters X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org Unfortunately the gmail sync failed.... Below the error: requesting messages 40266..40315 from imap server ; gmail loving gave us 19 messages in 4.6s =3D a whopping 4.1m/s scanned 748, indexed 747, skipped 0 bad and 1 seen messages in 400.4s =3D 1= .9 m/s ; requesting messages 40316..40365 from imap server ; gmail loving gave us 8 messages in 2.2s =3D a whopping 3.7m/s ; requesting messages 40366..40415 from imap server /media/DATA/Apps/heliotrope/lib/heliotrope/imap-dumper.rb:73:in `next_message': undefined method `size' for nil:NilClass (NoMethodError) from bin/heliotrope-add:128:in `
' For some reason "uid_fetch" is returning nil instead of an empty array (contrary to what Net::IMAP documentation says). Not really sure if checking for nil and simply repeat the query can resolve the problem but seems to be the best option. regards Horacio On Thu, Jun 9, 2011 at 10:48 PM, Horacio Sanson wrote: > On Wed, Jun 8, 2011 at 2:21 PM, William Morgan = wrote: >> Reformatted excerpts from Horacio Sanson's message of 2011-05-06: >>> Great, let me know when you have the modifications so I can stress >>> test them. >> >> In the most recent version of Heliotrope, there are two hooks you can >> use to do this: transform-text and transform-query. To use them, place >> your Ruby code in files called /hooks/.rb. >> >> For transform-text, place your code in /hooks/transform-text.= rb >> This hook will be called on any text added to the index. The 'text' >> variable will contain the text, and the hook should return (i.e. the >> last command should evaluate to) the transformed text. >> >> Example: >> =A0$ cat store/hooks/transform-text.rb >> =A0require 'MeCab' >> =A0MeCab::Tagger.new("-Owakati").parse(text).gsub(/\s+/, " ") >> >> For transform-query, place your code in > =A0dir>/hooks/transform-query.rb. This hook will be called on any query >> before it is executed. The 'query' variable will contain the query >> string, and the hook should return (i.e. the last command should >> evaluate to) the transformed query. >> >> Example: >> =A0$ cat store/hooks/transform-query.rb >> =A0require 'MeCab' >> =A0MeCab::Tagger.new("-Owakati").parse(query).gsub(/\s+/, " ") >> >> Let me know if you have any problems with these hooks! > > Great I am downloading my gmail accounts now (again). I can see you > have improved the imap-dumper.rb to handle uidvalidity and uidnext > that is also great. In the git log says gmail labels are also copied > to heliotrope but I don't see them in my index. > > BTW there are two small bugs in the imap-dumper.rb, see attached patch > for details. > > regards, > Horacio > >> -- >> William >> _______________________________________________ >> Sup-devel mailing list >> Sup-devel@rubyforge.org >> http://rubyforge.org/mailman/listinfo/sup-devel >> > > gmail > _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel