Ron Kass | 3 Mar 14:59

Error with remote DB (using tcpSrv)

We are getting these exceptions on some the remote nodes quite often, 
which causes the search to fail entirely.

This is the output of the tcpSrv:

    "Got exception NetworkError: Received EOF (context: 
/fts1/Database_1/ /fts1/Database_1_ARCHIVE/ /fts2/Database_2/ 
/fts2/Database_2_ARCHIVE/)

Closing connection."

We have 5 such nodes. Each contain 4 databases as above (two "database_" 
and two "database_*_ARCHIVE"). All show these exceptions.

we expanded the default timeout to 60000 (from the original 10000). 
These exceptions happen right away and not after many seconds, so its 
not a search timeout issue anyway.

Any thoughts..
Matthew Somerville | 3 Mar 19:56
Favicon

Re: How many docs to feed to an RSet?

Richard Boulton wrote:
> The best answer is to play around, experiment, and see what seems to 
> work for you.

Something that will probably have to wait for some future time then :-)

> Incidentally, if you're just passing 500 to get an accurate result 
> count, you might want to try using the "checkatleast" parameter for 
> that, instead.  eg: get_mset(0,20,500).

Ah, thanks, presumably a hangover from when we were using a much older 
version of Xapian. It seems to be behaving oddly, though. With this PHP code 
for the values of N 0, 100, 500, and 1000:

     $m = $enquire->get_mset(0, 20, N);
     print $m->get_matches_estimated(). ' ';

I get:
         432 453 465 510

when the actual number of results is 463. The wiki says that if the number 
of results is less than checkatleast, get_matches_estimated() should return 
the exact result. As I increase the first argument to get_mset() it 
eventually starts returning the right result.

It's defaulting to collapse on value 3, in case that is doing something; if 
I switch that off, everything returns 594, the presumably correct result 
non-collapsed.

ATB,
(Continue reading)

Richard Boulton | 3 Mar 20:05

Re: How many docs to feed to an RSet?

Matthew Somerville wrote:
> Ah, thanks, presumably a hangover from when we were using a much older 
> version of Xapian. It seems to be behaving oddly, though. With this PHP code 
> for the values of N 0, 100, 500, and 1000:
> 
>      $m = $enquire->get_mset(0, 20, N);
>      print $m->get_matches_estimated(). ' ';
> 
> I get:
>          432 453 465 510
> 
> when the actual number of results is 463. The wiki says that if the number 
> of results is less than checkatleast, get_matches_estimated() should return 
> the exact result. As I increase the first argument to get_mset() it 
> eventually starts returning the right result.
> 
> It's defaulting to collapse on value 3, in case that is doing something; if 
> I switch that off, everything returns 594, the presumably correct result 
> non-collapsed.

Which version of Xapian are you using?  There have been some bugs in the 
implementation of this - a couple were fixed in 1.0.3 and another in 
1.0.4 - if you're using 1.0.4 or 1.0.5 (or SVN HEAD), I think this is a 
  newly discovered problem.

--

-- 
Richard
Matthew Somerville | 3 Mar 23:15
Favicon

Re: How many docs to feed to an RSet?

Richard Boulton wrote:
> Which version of Xapian are you using?

1.0.5.

> There have been some bugs in the implementation of this - a couple were
> fixed in 1.0.3 and another in 1.0.4 - if you're using 1.0.4 or 1.0.5 (or
> SVN HEAD), I think this is a newly discovered problem.

Let me know if I can do anything to help (not sure my C++ skills are up to 
solving it myself, but will happily run queries/produce data etc.).

ATB,
Matthew
Ron Kass | 4 Mar 14:12

error in Xapian::Search

Getting this error suring search on a database:

 Use of uninitialized value in subroutine entry at 
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Search/Xapian/Enquire.pm 
line 56.

Any thoughts?

Ron
Olly Betts | 4 Mar 20:36
Favicon
Gravatar

Re: error in Xapian::Search

On Tue, Mar 04, 2008 at 03:12:25PM +0200, Ron Kass wrote:
> Getting this error suring search on a database:
> 
>  Use of uninitialized value in subroutine entry at 
> /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Search/Xapian/Enquire.pm 
> line 56.

You don't give us much to go on, but I'd guess you're passing an
undefined value to some method of Enquire.

Cheers,
    Olly
Ron Kass | 4 Mar 21:13

Re: error in Xapian::Search

Hi Olly.

Hope all is splendid in NZ :)

here is the bit of code where the error is originating from:

39:    sub get_mset {
40:      my $self = shift;
41:      my $nargs = scalar(@_);
42:      if( $nargs == 3 ) {
43:        my $type = ref( $_[2] );
44:        if ( $type eq 'CODE' ) {
45:          # get_mset(first, max, matchdecider) [perl extra]
46:          return $self->get_mset2(@_);
47:        }
48:        if ( $type eq 'Search::Xapian::RSet' ) {
49:          # get_mset(first, max, rset)
50:          splice @_, 2, 0, (0); # insert checkatleast
51:        }
52:      } elsif( $nargs == 4 && ref( $_[3] ) eq 'CODE' ) {
53:        # get_mset(first, max, rset, matchdecider)
54:        splice @_, 2, 0, (0); # insert checkatleast
55:      }
56:      return $self->get_mset1( @_ );
57:    }           

Note that line 56 is simply returning $self->get_mset1( @_ )

Both $self has value (Enquire object: 
Xapian::Enquire=SCALAR(0x14d04790)) and @_ which is 3 in our case.
(Continue reading)

Olly Betts | 4 Mar 22:08
Favicon
Gravatar

Re: How many docs to feed to an RSet?

On Mon, Mar 03, 2008 at 10:15:02PM +0000, Matthew Somerville wrote:
> Richard Boulton wrote:
> > There have been some bugs in the implementation of this - a couple were
> > fixed in 1.0.3 and another in 1.0.4 - if you're using 1.0.4 or 1.0.5 (or
> > SVN HEAD), I think this is a newly discovered problem.
> 
> Let me know if I can do anything to help (not sure my C++ skills are up to 
> solving it myself, but will happily run queries/produce data etc.).

We need to be able to see how this is going wrong.  It's annoyingly
fiddly to handle this case.

Is the database small enough to give us a copy to prod?

Otherwise, it would be interesting to see the bounds - print out
get_matches_upper_bound() and get_matches_lower_bound() as well as
get_matches_estimated() for each N.

> As I increase the first argument to get_mset() it eventually starts
> returning the right result.

Did you mean third rather than first here?

Cheers,
    Olly
Jarrod Roberson | 4 Mar 23:00
Favicon
Gravatar

do the java-swig bindings compile under windows?

I still can't get xapian core to build on windows so I guess it is kind of
moot to begin with.
Just wondering.
Olly Betts | 5 Mar 01:34
Favicon
Gravatar

Re: do the java-swig bindings compile under windows?

On Tue, Mar 04, 2008 at 05:00:51PM -0500, Jarrod Roberson wrote:
> I still can't get xapian core to build on windows so I guess it is kind of
> moot to begin with.

I've only tried to build them on Linux.

I'm fairly sure there's no support in the "MSVC makefiles".  You might
be able to build them with mingw or cygwin though.

Cheers,
    Olly

Gmane