Changeset 62

Show
Ignore:
Timestamp:
1999-09-17 15:47:15 (9 years ago)
Author:
richard
Message:

Shouldn't fall over if too many documents now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/xapian-core/backends/da/da_database.cc

    r61 r62  
    1414    termfreq = tf; 
    1515    postlist = pl; 
    16     termweight = log((size - tf) / tf); 
     16 
     17    termweight = (size - tf + 0.5) / (tf + 0.5); 
     18    if(termweight < 1) termweight = 1; 
     19 
     20    termweight = log(termweight); 
    1721 
    1822    printf("(dbsize, termfreq) = (%4d, %4d)\t=> termweight = %f\n",