[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-devel] Cannot query Japanese characters



Unfortunately the gmail sync failed....  Below the error:

 requesting messages 40266..40315 from imap server
; gmail loving gave us 19 messages in 4.6s = a whopping 4.1m/s
scanned 748, indexed 747, skipped 0 bad and 1 seen messages in 400.4s = 1.9 m/s
; requesting messages 40316..40365 from imap server
; gmail loving gave us 8 messages in 2.2s = 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 `<main>'

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 <hsanson@gmail.com> wrote:
> On Wed, Jun 8, 2011 at 2:21 PM, William Morgan <wmorgan-sup@masanjin.net> 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 <store dir>/hooks/<hook-name>.rb.
>>
>> For transform-text, place your code in <store dir>/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:
>>  $ cat store/hooks/transform-text.rb
>>  require 'MeCab'
>>  MeCab::Tagger.new("-Owakati").parse(text).gsub(/\s+/, " ")
>>
>> For transform-query, place your code in <store
>>  dir>/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:
>>  $ cat store/hooks/transform-query.rb
>>  require 'MeCab'
>>  MeCab::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 <wmorgan-sup@masanjin.net>
>> _______________________________________________
>> 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