From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.142.125.10 with SMTP id x10cs69453wfc; Thu, 9 Jun 2011 08:09:02 -0700 (PDT) Received: by 10.229.190.133 with SMTP id di5mr581494qcb.286.1307632142200; Thu, 09 Jun 2011 08:09:02 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id mz13si3326723qcb.5.2011.06.09.08.09.01; Thu, 09 Jun 2011 08:09:02 -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 91A2A3C808E for ; Thu, 9 Jun 2011 11:09:01 -0400 (EDT) Received: from mail-vw0-f50.google.com (mail-vw0-f50.google.com [209.85.212.50]) by rubyforge.org (Postfix) with ESMTP id D6F633C8088 for ; Thu, 9 Jun 2011 09:48:23 -0400 (EDT) Received: by vws14 with SMTP id 14so1603695vws.23 for ; Thu, 09 Jun 2011 06:48:23 -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; bh=upx9VLSNVyu5F2pl4TaUEgtp+tesGY4+QcSWUIGm+84=; b=P8A4djH1KeEGDZDKafkqGDF4HJ7PSO+khcQhB7czAankbUi4NuGB4UQZazVynqgYGT qqc3YDk/F3MERs9/Sg5EDyr+xLLKMeHK2qJ0/8nnbLqSHTEYRxllUm99mNAOxKeznku/ JWR9iX9vDf7W2rdbG3EUAuw5/fyhVuf1IjaGE= 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; b=M4F+j+nBeh/B1/+I5nEQNNR11d341FmCNXUwZ7VYOhefMH/Pgz8OvQpGjIX+ETXxs1 7Y20yIPt4cL3nUcFcZ8Tu/rTKuGrrw1A9XxuoyoYPnkzl81A7lJZR7RVs0eXwyjHjSFO OEH50JX24zcZof8tABKPvRfOq8JjrZX0ZCR3s= MIME-Version: 1.0 Received: by 10.52.32.98 with SMTP id h2mr1062548vdi.227.1307627303398; Thu, 09 Jun 2011 06:48:23 -0700 (PDT) Received: by 10.52.184.225 with HTTP; Thu, 9 Jun 2011 06:48:23 -0700 (PDT) In-Reply-To: <1307509658-sup-6995@masanjin.net> 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 22:48:23 +0900 Message-ID: From: Horacio Sanson To: Sup developer discussion Content-Type: multipart/mixed; boundary=bcaec51d2b6aeaed0904a547b428 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: , Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --bcaec51d2b6aeaed0904a547b428 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jun 8, 2011 at 2:21 PM, William Morgan w= rote: > 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.r= b > 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 --bcaec51d2b6aeaed0904a547b428 Content-Type: text/x-patch; charset=US-ASCII; name="0001-Fix-imap-dumper.patch" Content-Disposition: attachment; filename="0001-Fix-imap-dumper.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_goprfgkt0 RnJvbSA0YmYyNGYxNjYxMmM5NTRiYmJkY2RiOWI0OGE3MDU3MWMzYmIxYTRkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBIb3JhY2lvIFNhbnNvbiA8aHNhbnNvbkBnbWFpbC5jb20+CkRh dGU6IFRodSwgOSBKdW4gMjAxMSAyMjozOTozOSArMDkwMApTdWJqZWN0OiBbUEFUQ0hdIEZpeCBp bWFwLWR1bXBlci4KCi0tLQogbGliL2hlbGlvdHJvcGUvaW1hcC1kdW1wZXIucmIgfCAgICA0ICsr LS0KIDEgZmlsZXMgY2hhbmdlZCwgMiBpbnNlcnRpb25zKCspLCAyIGRlbGV0aW9ucygtKQoKZGlm ZiAtLWdpdCBhL2xpYi9oZWxpb3Ryb3BlL2ltYXAtZHVtcGVyLnJiIGIvbGliL2hlbGlvdHJvcGUv aW1hcC1kdW1wZXIucmIKaW5kZXggNWE5Njk2MC4uZTVkY2MxYiAxMDA2NDQKLS0tIGEvbGliL2hl bGlvdHJvcGUvaW1hcC1kdW1wZXIucmIKKysrIGIvbGliL2hlbGlvdHJvcGUvaW1hcC1kdW1wZXIu cmIKQEAgLTMsNyArMyw3IEBAIHJlcXVpcmUgIm5ldC9pbWFwIgogcmVxdWlyZSAnanNvbicKIAog bW9kdWxlIEhlbGlvdHJvcGUKLWNsYXNzIEltYXBEdW1wZXIKK2NsYXNzIElNQVBEdW1wZXIKICAg ZGVmIGluaXRpYWxpemUgb3B0cwogICAgIEBob3N0ID0gb3B0c1s6aG9zdF0gb3IgcmFpc2UgQXJn dW1lbnRFcnJvciwgIm5lZWQgOmhvc3QiCiAgICAgQHVzZXJuYW1lID0gb3B0c1s6dXNlcm5hbWVd IG9yIHJhaXNlIEFyZ3VtZW50RXJyb3IsICJuZWVkIDp1c2VybmFtZSIKQEAgLTExLDcgKzExLDcg QEAgY2xhc3MgSW1hcER1bXBlcgogICAgIEBmbiA9IG9wdHNbOmZuXSBvciByYWlzZSBBcmd1bWVu dEVycm9yLCAibmVlZCA6Zm4iCiAKICAgICBAc3NsID0gb3B0cy5tZW1iZXI/KDpzc2wpID8gb3B0 c1s6c3NsXSA6IHRydWUKLSAgICBAcG9ydCA9IG9wdHNbOnBvcnRdIHx8IChzc2wgPyA5OTMgOiAx NDMpCisgICAgQHBvcnQgPSBvcHRzWzpwb3J0XSB8fCAoQHNzbCA/IDk5MyA6IDE0MykKICAgICBA Zm9sZGVyID0gb3B0c1s6Zm9sZGVyXSB8fCAiaW5ib3giCiAKICAgICBAbXNncyA9IFtdCi0tIAox LjcuNC4xCgo= --bcaec51d2b6aeaed0904a547b428 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel --bcaec51d2b6aeaed0904a547b428--