[Xapian-discuss] xapian perl bindings: aborted on numbers

Josef Novak josef.robert.novak at gmail.com
Mon Jun 16 17:37:00 BST 2008


Hi,
  I'm using xapian+omega to index about 135gb of blogs data I've got
on hand.  The index building was extremely smooth, and so far I've had
no problems using the perl bindings to build simple search scripts for
digging around in the data.  Today however, I noticed that any time I
include a digit string as a query term the search bombs out at the
db->enquire stage.  The related code I'm using is very simple:

...
my $enq = $db->enquire( OP_OR, @terms );
if( defined($opts{v}) ){printf "Parsing query '%s'\n",
$enq->get_query()->get_description();}
my @matches = $enq->matches(0, $max);

if( defined($opts{v}) ){print scalar(@matches) . " results found\n";}
...

  Now if I load up @terms with something like qw/ one fine day /
everything works fine.  Things work with a query like @terms = qw/
found some a4 paper / i.e. if a term is composed of letters and
numbers there is no issue.  However, any term that is entirely
composed of digits seems to kill the search: @terms = qw / who won the
2004 superbowl / will result in an abort after db->enquire.

  Does this maybe have something to do with perl's native typing?  Is
there something basic that I'm doing wrong?  Should I switch to the
python bindings instead?

  Thanks!



More information about the Xapian-discuss mailing list