Changeset 1908

Show
Ignore:
Timestamp:
07.02.2001 11:48:51 (19 years ago)
Author:
kjm18
Message:

get_mg_type() added. new variable: mgppsearchclass::gdbm_level. defaults to
Document, can be changed by set_gdbm_level(level). Docnums from a search
returned at this level (corresponds to what level the gdbm file is done
at (usu Section).

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

Legend:

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

    r1834 r1908  
    5252mgppsearchclass::mgppsearchclass () 
    5353  : searchclass() { 
    54   
     54 
     55  gdbm_level = "Document"; 
    5556} 
    5657 
     
    6263      cache = NULL; 
    6364    } 
     65} 
     66 
     67void mgppsearchclass::set_gdbm_level(text_t &level) { 
     68  gdbm_level = level; 
     69   
    6470} 
    6571 
     
    115121  UCArrayClear(level); 
    116122   
    117   //always return sections - default for GSDL 
    118   SetCStr(level, "Section"); 
     123  //set the level for results 
     124  SetCStr(level, gdbm_level.getcstr()); 
     125 
    119126   
    120127  // do the query 
     
    242249  UCArray doctext; 
    243250  UCArray level; 
    244   SetCStr(level, "Section"); 
     251  //SetCStr(level, "Section"); 
     252  SetCStr(level, gdbm_level.getcstr()); 
    245253  if (!GetDocText(textdata, level, (unsigned long)docnum, doctext)) { 
    246254    //error 
  • trunk/gsdl/src/colservr/mgppsearch.h

    r1324 r1908  
    3737  virtual ~mgppsearchclass (); 
    3838 
     39  virtual text_t get_mg_type() {return "mgpp";} 
     40  
    3941  // the search results are returned in queryresults 
    4042  // search returns 'true' if it was able to do a search 
     
    7274           char *&UDoc, int &ULen); 
    7375  */ 
     76  void set_gdbm_level(text_t &level); 
     77 
     78 protected: 
     79  text_t gdbm_level; // the level used in gdbm file (usu. Section, but may be  
     80                     // Document) 
     81 
    7482}; 
    7583