Changeset 447 for trunk/gsdl/src/recpt/queryaction.cpp
- Timestamp:
- 1999-08-11T10:46:33+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/queryaction.cpp
r421 r447 12 12 /* 13 13 $Log$ 14 Revision 1.18 1999/08/10 22:46:33 sjboddie 15 changed format option result to QueryResults and added QueryLinks option 16 14 17 Revision 1.17 1999/07/30 02:24:42 sjboddie 15 18 added collectinfo argument to some functions … … 432 435 433 436 if (formatstring.empty()) { 434 text_tmap::const_iterator result = collectinfo.format.find(" result");437 text_tmap::const_iterator result = collectinfo.format.find("QueryResults"); 435 438 if (result != collectinfo.format.end()) 436 439 formatstring = (*result).second; 440 } 441 442 // see if there's a QueryLinks format option 443 text_t querylinkmeta; 444 bool havequerylink = false; 445 text_tmap::const_iterator it = collectinfo.format.find("QueryLinks"); 446 if (it != collectinfo.format.end()) { 447 querylinkmeta = (*it).second; 448 havequerylink = true; 437 449 } 438 450 … … 453 465 454 466 parse_formatstring (formatstring, formatlistptr, request.fields, request.getParents); 467 468 if (havequerylink) 469 request.fields.push_back (querylinkmeta); 470 471 int metasize = request.fields.size(); 455 472 456 473 // do the query … … 475 492 // those that did match will have been sorted to the top 476 493 if ((*this_doc).num_phrase_match < num_phrases) break; 477 textout << outconvert << disp << "<tr>\n" 478 479 // << "<td valign=top nowrap>r: " << (*this_doc).ranking 480 // << " t: " << (*this_doc).num_terms_matched << " p: " 481 // << (*this_doc).num_phrase_match << "</td>\n" 482 483 << get_formatted_string (*this_doc, formatlistptr) << "\n" 484 << "</tr>\n"; 494 textout << "<tr>\n"; 495 if (havequerylink) { 496 const text_t &qlmeta = (*this_doc).metadata[metasize-1].values.back(); 497 if (qlmeta.empty()) 498 textout << outconvert << disp 499 << get_formatted_string (*this_doc, formatlistptr, "", "_icontext_") << "\n"; 500 else 501 textout << outconvert << disp 502 << get_formatted_string (*this_doc, formatlistptr) << "\n"; 503 } else { 504 textout << outconvert << disp 505 << get_formatted_string (*this_doc, formatlistptr) << "\n"; 506 } 507 textout << "</tr>\n"; 485 508 486 509 this_doc ++; … … 537 560 } 538 561 539 if (isApprox == MoreThan && numdocs > maxdocs) numdocs = maxdocs; 562 // if (isApprox == MoreThan && numdocs > maxdocs) numdocs = maxdocs; 563 if (numdocs > maxdocs) {numdocs = maxdocs; isApprox = MoreThan;} 540 564 541 565 if (isApprox == Approximate) resline = "_textapprox_";
Note:
See TracChangeset
for help on using the changeset viewer.