Changeset 1690


Ignore:
Timestamp:
2000-11-22T16:23:32+13:00 (23 years ago)
Author:
nzdl
Message:

Tidied up the "n documents matched the query" string that's produced
when searching mulitple collections

File:
1 edited

Legend:

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

    r1661 r1690  
    902902  disp.setmacro ("freqmsg", "query", freqmsg);
    903903
     904  int maxdocs = args.getintarg("m");
     905  int firstdoc = args.getintarg("r");
     906  int hitsperpage = args.getintarg("o");
     907  if (num_phrases > 0) isApprox = Exact;
     908  if (maxdocs == -1) maxdocs = numdocs;
     909  else if (numdocs > maxdocs) {
     910    numdocs = maxdocs;
     911    isApprox = MoreThan;
     912  }
     913  if (hitsperpage == -1) hitsperpage = numdocs;
     914
    904915  text_t resline;
    905   if (num_phrases > 0) isApprox = Exact;
    906916  if (isApprox == Approximate) resline = "_textapprox_";
    907917  else if (isApprox == MoreThan) resline = "_textmorethan_";
     
    921931  format_t *formatlistptr = NULL;
    922932  browserclass *browserptr = NULL;
    923 
    924   int maxdocs = args.getintarg("m");
    925   int firstdoc = args.getintarg("r");
    926   int hitsperpage = args.getintarg("o");
    927   if (maxdocs == -1) maxdocs = numdocs;
    928   else if (numdocs > maxdocs) numdocs = maxdocs;
    929   if (hitsperpage == -1) hitsperpage = numdocs;
    930933
    931934  // set up _thisfirst_ and _thislast_ macros
Note: See TracChangeset for help on using the changeset viewer.