Ignore:
Timestamp:
1999-09-01T10:44:38+12:00 (25 years ago)
Author:
rjmcnab
Message:

Fixed small bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/colservr/phrasequeryfilter.cpp

    r351 r499  
    1212/*
    1313   $Log$
     14   Revision 1.3  1999/08/31 22:44:38  rjmcnab
     15   Fixed small bug.
     16
    1417   Revision 1.2  1999/07/07 06:19:45  rjmcnab
    1518   Added ability to combine two or more independant queries.
     
    3235void phrasequeryfilterclass::post_process (const queryparamclass &queryparams,
    3336                       queryresultsclass &queryresults) {
     37  bool results_shrunk = false;
     38
    3439  // post-process the results if needed
    3540  if (queryresults.orgterms.size() > 1 && !queryresults.docs.docset.empty()) {
     
    4853                 (*docs_here).second.docnum)) {
    4954    (*docs_here).second.num_phrase_match++;
     55    docs_here++;
     56
     57      } else {
     58    docresultmap::iterator this_doc_here = docs_here;
     59    docs_here++;
     60    if (queryparams.match_mode == 1) {
     61      // need to delete this element, there was no exact match
     62      queryresults.docs.docset.erase(this_doc_here);
     63      results_shrunk = true;
     64    }
    5065      }
    51      
    52       docs_here++;
    5366    }
    5467  }
     68
     69  if (results_shrunk) queryresults.docs_matched = queryresults.docs.docset.size();
    5570}
    5671
Note: See TracChangeset for help on using the changeset viewer.