Changeset 16445

Show
Ignore:
Timestamp:
17.07.2008 17:12:19 (11 years ago)
Author:
mdewsnip
Message:

Search result document numbers are now represented with a text_t rather than an int, in preparation for changing Lucene to return the Greenstone document OIDs directly rather than looking them up as a separate step. This is better for efficiency and is also required for incremental building.

Location:
gsdl/trunk/src/colservr
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/colservr/lucenequeryfilter.cpp

    r15681 r16445  
    168168    ResultDocInfo_t resultdoc; 
    169169    text_t trans_OID; 
    170     vector<int>::iterator docorder_here = queryresults.docs.docorder.begin(); 
    171     vector<int>::iterator docorder_end = queryresults.docs.docorder.end(); 
     170    vector<text_t>::iterator docorder_here = queryresults.docs.docorder.begin(); 
     171    vector<text_t>::iterator docorder_end = queryresults.docs.docorder.end(); 
    172172 
    173173    // Now handled by Lucene directly 
  • gsdl/trunk/src/colservr/mgppqueryfilter.cpp

    r15681 r16445  
    176176    ResultDocInfo_t resultdoc; 
    177177    text_t trans_OID; 
    178     vector<int>::iterator docorder_here = queryresults.docs.docorder.begin(); 
    179     vector<int>::iterator docorder_end = queryresults.docs.docorder.end(); 
     178    vector<text_t>::iterator docorder_here = queryresults.docs.docorder.begin(); 
     179    vector<text_t>::iterator docorder_end = queryresults.docs.docorder.end(); 
    180180 
    181181    if (endresults == -1) endresults = MAXNUMDOCS; 
  • gsdl/trunk/src/colservr/mgqueryfilter.cpp

    r16310 r16445  
    4646} 
    4747 
    48 bool resultsorderer_t::operator()(const int &t1, const int &t2) const { 
     48bool resultsorderer_t::operator()(const text_t &t1, const text_t &t2) const { 
    4949  if (docset == NULL) return t1>t2; 
    5050 
     
    350350    ResultDocInfo_t resultdoc; 
    351351    text_t trans_OID; 
    352     vector<int>::iterator docorder_here = queryresults.docs.docorder.begin(); 
    353     vector<int>::iterator docorder_end = queryresults.docs.docorder.end(); 
     352    vector<text_t>::iterator docorder_here = queryresults.docs.docorder.begin(); 
     353    vector<text_t>::iterator docorder_end = queryresults.docs.docorder.end(); 
    354354 
    355355    // documents containing matching phrases will be sorted to the top so 
  • gsdl/trunk/src/colservr/mgqueryfilter.h

    r15595 r16445  
    4141  resultsorderer_t(); 
    4242  void clear(); 
    43   bool operator()(const int &t1, const int &t2) const; 
     43  bool operator()(const text_t &t1, const text_t &t2) const; 
    4444}; 
    4545 
  • gsdl/trunk/src/colservr/queryfilter.cpp

    r16310 r16445  
    2929 
    3030// translate will return true if successful 
    31 bool queryfilterclass::translate (dbclass *db_ptr, int docnum, text_t &trans_OID) { 
     31bool queryfilterclass::translate (dbclass *db_ptr, text_t& docnum, text_t &trans_OID) { 
    3232  infodbclass info; 
    3333 
  • gsdl/trunk/src/colservr/queryfilter.h

    r15558 r16445  
    8383 
    8484  text_t get_filter_name () {return "QueryFilter";} 
    85   bool translate(dbclass *db_ptr, int docnum, text_t &trans_OID); 
     85  bool translate(dbclass *db_ptr, text_t& docnum, text_t &trans_OID); 
    8686  bool need_matching_docs (int filterResultOptions); 
    8787  bool need_term_info (int filterResultOptions); 
  • gsdl/trunk/src/colservr/queryinfo.h

    r12868 r16445  
    143143}; 
    144144 
    145 typedef map<int, docresultclass, ltint> docresultmap; 
     145typedef map<text_t, docresultclass, lttext_t> docresultmap; 
    146146 
    147147 
     
    151151struct docresultsclass { 
    152152  docresultmap docset; 
    153   vector<int> docorder; 
     153  vector<text_t> docorder; 
    154154 
    155155  docresultsclass ();