Changeset 1983


Ignore:
Timestamp:
2001-02-15T15:44:52+13:00 (23 years ago)
Author:
mjd12
Message:

Modified corbaproto::filter and added corbaresponse_resultTermInfoToC to
fix bug where search terms are not highlighted (mjd12, Jan 2001).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/corbaproto.mpp

    r1860 r1983  
    278278}
    279279
     280
     281// Added 31/1/2001, Michael Dewsnip
     282void corbaresponse_resultTermInfoToC(corbaTermInfo_array corbainfo, TermInfo_tarray &terminfo)
     283{
     284  TermInfo_t ti;
     285
     286  for (unsigned int i = 0; i < corbainfo.length(); i++) {
     287    corbaconv_text_t::setCorbatext(ti.term, corbainfo[i].term);
     288    ti.freq = corbainfo[i].frequency;
     289
     290    for (unsigned int j = 0; j < corbainfo[i].matchTerms.length(); j++) {
     291      text_t mt;
     292      corbaconv_text_t::setCorbatext(mt, corbainfo[i].matchTerms[j]);
     293
     294      ti.matchTerms.push_back(mt);
     295    }
     296
     297    terminfo.push_back(ti);
     298  }
     299}
     300
     301
    280302corbaproto::corbaproto(char* _site_name)
    281303{ char *dummyv[1] = {""};
     
    643665}
    644666
     667
    645668void corbaproto::filter (const text_t &collection,
    646669              FilterRequest_t &request,
     
    680703  corbaresponse_resultDocInfoToC(corbaResponse.docInfo, response.docInfo);
    681704
     705  // Added 31/1/2001, Michael Dewsnip
     706  corbaresponse_resultTermInfoToC(corbaResponse.termInfo, response.termInfo);
     707
    682708  err = (comerror_t) corbaError;
    683709  //  cout << "Corbaproto::Filter" << endl;
    684 
    685 }
     710}
     711
    686712
    687713void corbaproto::get_document (const text_t &collection,
Note: See TracChangeset for help on using the changeset viewer.