Ignore:
Timestamp:
1999-07-16T15:42:23+12:00 (25 years ago)
Author:
sjboddie
Message:

changed isApprox

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/queryaction.cpp

    r397 r398  
    1212/*
    1313   $Log$
     14   Revision 1.14  1999/07/16 03:41:29  sjboddie
     15   changed isApprox
     16
    1417   Revision 1.13  1999/07/16 00:19:01  sjboddie
    1518   some changes to the way quoted queries are handled
     
    512515  // set up _resultline_ macro
    513516  text_t resline;
    514 
    515   // can't use isApprox here as it will be false as long
    516   // as numDocs < MAXDOCS (currently 500). If arg_m is less
    517   // than MAXDOCS numDocs can be greater than arg_m while
    518   // isApprox is false.
    519   if (response.isApprox) resline = "_textapprox_";
     517  int maxdocs = args.getintarg("m");
     518
     519  if (response.isApprox == Approximate) resline = "_textapprox_";
     520  else if ((response.isApprox == MoreThan) || (response.numDocs > maxdocs))
     521    resline = "_textmorethan_";
    520522  if (numdocs == 0) resline = "_textnodocs_";
    521523  else if (numdocs == 1) resline += "_text1doc_";
    522   else resline += text_t(response.numDocs) + " _textlotsdocs_";
    523 
     524  else
     525    if (response.numDocs > maxdocs)
     526      resline += text_t(maxdocs) + " _textlotsdocs_";
     527    else
     528      resline += text_t(response.numDocs) + " _textlotsdocs_";
     529 
    524530  disp.setmacro("resultline", "query", resline);
    525531
Note: See TracChangeset for help on using the changeset viewer.