From mboxrd@z Thu Jan 1 00:00:00 1970 From: olly@survex.com (Olly Betts) Date: Fri, 26 Jun 2009 02:00:57 +0000 (UTC) Subject: [sup-talk] [PATCH 0/18] Xapian-based index References: <1245531017-9907-1-git-send-email-rlane@club.cc.cmu.edu> <1245854803-sup-4481@entry> <1245864733-sup-1216@entry> Message-ID: William Morgan writes: > Reformatted excerpts from William Morgan's message of 2009-06-24: > > sup-sync crashes for me fairly systematically with this error: > > > > ./lib/sup/xapian_index.rb:404:in `sortable_serialise': Expected argument 0 of > > type double, but got Fixnum 51767811298 (TypeError) > > This turns out to be due to dates being far in the future (e.g. on spam > messages). I'm using the attached patch, which is pretty much a hack, to > force them to be between 1969 and 2038. Better solutions welcome. (I > haven't committed this.) The error you get here is actually a bug in SWIG (http://www.swig.org/). Xapian uses SWIG to generate the wrappers for Ruby. The code SWIG currently uses to convert a parameter when a C/C++ function takes a double doesn't handle a "fixnum" which is larger than MAXINT. I've just applied a fix to SWIG SVN: http://swig.svn.sourceforge.net/viewvc/swig?view=rev&revision=11320 I'll make sure this fix makes it into the next Xapian release (which will be 1.0.14). Cheers, Olly