List Info

Thread: Argument isn't numeric in subroutine entry ? Any ideas please...




Argument isn't numeric in subroutine entry ? Any ideas please...
country flaguser name
United Kingdom
2007-10-11 12:05:30
Hey all !

I'm getting a really strange thing happening in some code
that once worked with an older version of Xapian < 1.0
and that now seems "broken" in 1.2.0.

Basically if I do...

my my_terms = qw/query here/;
my $xapian_query = Search::Xapian::Query->new(OP_OR, my_terms);

my my_terms2 = qw/nuts beer/;
my $xapian_query2 = Search::Xapian::Query->new(OP_OR,
my_terms);


and then finally:


my $final_query = Search::Xapian::Query(OP_AND,
($xapian_query, $xapian_query2));



It will throw an error like: 


Argument "Xapian::Query(((query OR here) AND (nuts OR
beer)))" isn't numeric in subroutine entry at
/perl/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Sear
ch/Xapian/Enquire.pm line 42.


I'm sure it once worked... hopefully you guys can make out
what I'm trying to achieve - any pointers warmly welcomed.
Many many thanks,
>joss



     
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the
answer. Try it
now.
http://uk.answers.yahoo.
com/
_______________________________________________
Xapian-discuss mailing list
Xapian-discusslists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss

Re: Argument isn't numeric in subroutine entry ? Any ideas please...
country flaguser name
United Kingdom
2007-10-11 12:45:59
I don't understand the error you get, but this line is
wrong:

> my $final_query = Search::Xapian::Query(OP_AND,
($xapian_query, $xapian_query2));

That should be:

  my $final_query = Search::Xapian::Query->new(OP_AND,
($xapian_query, $xapian_query2));

Or just:

  my $final_query = Search::Xapian::Query->new(OP_AND,
$xapian_query, $xapian_query2);

If that's not it, can you post a complete example script? 
It's much
harder to work with just a snippet (for a start, I've no
idea what
"entry" does, or which line is line 42...)

Cheers,
    Olly

_______________________________________________
Xapian-discuss mailing list
Xapian-discusslists.xapian.org
http://lists.xapian.org/mailman/listinfo/xapian-discuss

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )