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

Josef Novak josef.robert.novak at gmail.com
Thu Jun 19 06:00:21 BST 2008


Hi,
  I went ahead and rebuilt all of indexes from scratch and now the
problem seems to have disappeared.  I used exactly the same scripts,
so I'm a bit confused as to what could possibly be different.  Perhaps
one of the indexes was corrupt or something, although why exactly that
would affect only terms composed entirely of integers I'm not sure?
  Anyway it does not seem to be a problem specific to the perl
bindings so I apologize for the misdirection.

  -Joe

On Tue, Jun 17, 2008 at 9:07 PM, Amias Channer <something at amias.org.uk> wrote:
> On Tue, 2008-06-17 at 01:37 +0900, Josef Novak wrote:
>> 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?
>
> I'm not having this problem with  Perl Search::Xapian 1.0.4.0 and the
> c libs from ubuntu gutsy. Perl has loose typing so i doubt its that .
> Are you sure the Perl libs and C libs are happy together ?
>
> Toodle-pip
> Amias
>
>
>>   Thanks!
>>
>> _______________________________________________
>> Xapian-discuss mailing list
>> Xapian-discuss at lists.xapian.org
>> http://lists.xapian.org/mailman/listinfo/xapian-discuss
> --
>  Freelance programming , consultancy and hardware builds
> blog.amias.org.uk * www.amias.org.uk * www.ecotalk.org.uk
>
>
>



More information about the Xapian-discuss mailing list