Perlfect Solutions
 

[Perlfect-search] Division by zero when indexing

Jochen Luig perlfect-search@perlfect.com
Mon, 24 Feb 2003 12:13:35 +0100
Hi!

I have perlfect search 3.10 installed. Due to the lack of DB_File and 
the size-constraints of SLDBM I tried MLDBM::Sync::SDBM_File.
The indexing part seems to work all right, but the weights function 
stops with the following error message:

Illegal division by zero at ./indexer.pl line 222

line 222 looks like this:

$weight = $tdf{$doc_id} * log ($DN / $df);

The df-file exists, is definitely not empty and the tie succeeds, so it 
must contain a zero value somewhere. How can this happen?

Thanks in advance

Jochen