Changeset 16915

Show
Ignore:
Timestamp:
20.08.2008 15:40:00 (11 years ago)
Author:
mdewsnip
Message:

Changes made by Richard Managh at DL Consulting Ltd for returning document-level term frequency totals.

Location:
gsdl/trunk/runtime-src/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/colservr/expat_resultset.cpp

    r16311 r16915  
    9898      doc.docnum = id_num; 
    9999      doc.docweight = qrpack_ptr->match_count; 
     100 
     101      char* termfreq = get_attribute(attributes, "termfreq"); 
     102      if (termfreq != NULL) 
     103      { 
     104    doc.num_query_terms_matched = atoi(termfreq); 
     105      } 
     106 
    100107      queryresult_ptr->docs.docset[doc.docnum] = doc; 
    101108      queryresult_ptr->docs.docorder.push_back(doc.docnum); 
  • gsdl/trunk/runtime-src/src/colservr/lucenequeryfilter.cpp

    r16445 r16915  
    202202                resultdoc.result_num = resultnum; 
    203203                resultdoc.ranking = (int)((*docset_here).second.docweight * 10000.0 + 0.5); 
     204                resultdoc.num_terms_matched = (*docset_here).second.num_query_terms_matched; 
    204205                 
    205206                response.docInfo.push_back (resultdoc); 
  • gsdl/trunk/runtime-src/src/recpt/formattools.cpp

    r15418 r16915  
    561561  else if (meta == "DocRank") 
    562562    formatlistptr->command = comRank; 
     563  else if (meta == "DocTermsFreqTotal") 
     564    formatlistptr->command = comDocTermsFreqTotal; 
    563565  else if (meta.size() >= 10 && (substr(meta.begin(), meta.begin()+10) == "collection")) { 
    564566    formatlistptr->command = comCollection; 
     
    14971499    return get_or (collection,collectproto, docinfo, disp, formatlistptr->orptr,  
    14981500               options, logout); 
     1501     case comDocTermsFreqTotal: 
     1502       return docinfo.num_terms_matched; 
    14991503     case comCollection: 
    15001504       if (formatlistptr->meta.metaname == g_EmptyText) { 
  • gsdl/trunk/runtime-src/src/recpt/formattools.h

    r15415 r16915  
    3535        comDoc, comHighlight, comEndHighlight, comRel, comHref, comSummary, 
    3636        comTOC, comImage, comDocumentButtonDetach, comDocumentButtonHighlight, 
    37         comDocumentButtonExpandContents, comDocumentButtonExpandText, comOID, comTopOID, comRank, comCollection}; 
     37        comDocumentButtonExpandContents, comDocumentButtonExpandText, comOID, comTopOID, comRank, 
     38        comCollection, comDocTermsFreqTotal}; 
    3839 
    3940enum mcommand_t {mNone=0, mCgiSafe=1, mParent=2, mSibling=4, mChild=8, mSpecial=16};