Changeset 398 for trunk/gsdl/src/recpt
- Timestamp:
- 1999-07-16T15:42:23+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/recpt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/comtypes.cpp
r353 r398 12 12 /* 13 13 $Log$ 14 Revision 1.14 1999/07/16 03:41:29 sjboddie 15 changed isApprox 16 14 17 Revision 1.13 1999/07/08 20:46:45 rjmcnab 15 18 Added the result number to the ResultDocInfo_t … … 202 205 void FilterResponse_t::clear () { 203 206 numDocs = 0; 204 isApprox = false;207 isApprox = Exact; 205 208 termInfo.erase (termInfo.begin(), termInfo.end()); 206 209 docInfo.erase (docInfo.begin(), docInfo.end()); -
trunk/gsdl/src/recpt/comtypes.h
r353 r398 278 278 // FilterResponse ::= SEQUENCE { 279 279 // numDocs [0] IMPLICIT INTEGER, 280 // isApprox [1] IMPLICIT BOOLEAN, -- whether numDocs is approximate 281 // termInfo [2] IMPLICIT SEQUENCE OF TermInfo, -- empty if not required 282 // docInfo [3] IMPLICIT SEQUENCE OF ResultDocInfo -- empty if not required 283 // } 280 // isApprox [1] ENUMERATED {Exact(0), Approximate(1), MoreThan(2)}, -- whether numDocs is approximate 281 // termInfo [2] IMPLICIT SEQUENCE OF TermInfo, -- empty if not required 282 // docInfo [3] IMPLICIT SEQUENCE OF ResultDocInfo -- empty if not required 283 // } 284 285 enum isapprox {Exact=0, Approximate=1, MoreThan=2}; 286 284 287 struct FilterResponse_t { 285 288 void clear (); … … 287 290 288 291 int numDocs; 289 bool isApprox; // some versions of mg might be more 'approximate' than others :-)292 isapprox isApprox; 290 293 TermInfo_tarray termInfo; // empty if not requested 291 294 ResultDocInfo_tarray docInfo; // empty if not requested -
trunk/gsdl/src/recpt/queryaction.cpp
r397 r398 12 12 /* 13 13 $Log$ 14 Revision 1.14 1999/07/16 03:41:29 sjboddie 15 changed isApprox 16 14 17 Revision 1.13 1999/07/16 00:19:01 sjboddie 15 18 some changes to the way quoted queries are handled … … 512 515 // set up _resultline_ macro 513 516 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_"; 520 522 if (numdocs == 0) resline = "_textnodocs_"; 521 523 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 524 530 disp.setmacro("resultline", "query", resline); 525 531
Note:
See TracChangeset
for help on using the changeset viewer.