Changeset 1683


Ignore:
Timestamp:
2000-11-20T21:24:33+13:00 (23 years ago)
Author:
paynter
Message:

Bug fix - all documents returned for phrases of more than one word were
being stored with an out-by-one error. The probem is that internally
documents are numbered 0 to N-1, but in MGPP they're numbered 1 to N. I
thought I'd fixed this, but had only updated the code for the
phrases-of-length-1 case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/phind/generate/suffix.cpp

    r1631 r1683  
    436436        phraseData << ";";
    437437      }
    438       phraseData << "d" << i;
     438      // Output the document number.  Note that here we've numbered the
     439      // N documents from 0 to N-1, but later they'll be 1-N.  Thus we
     440      // add 1 to the document id when we output it.
     441      phraseData << "d" << (i+1);
     442      // Next, output the frequency with which the document occurs, but
     443      // only if it is > 1.
    439444      if (documentFrequency[i] > 1) {
    440445        phraseData << "," << documentFrequency[i];
Note: See TracChangeset for help on using the changeset viewer.