Changeset 15594

Show
Ignore:
Timestamp:
20.05.2008 13:39:30 (11 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Replaced all "gdbm_level" with "text_level".

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

Legend:

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

    r15558 r15594  
    108108    } 
    109109  } else if (key == "textlevel") { 
    110       ((lucenesearchclass *)textsearchptr)->set_gdbm_level( cfgline[0]); 
     110      ((lucenesearchclass *)textsearchptr)->set_text_level(cfgline[0]); 
    111111  } 
    112112   
  • gsdl/trunk/src/colservr/lucenesearch.cpp

    r15049 r15594  
    6767  : searchclass() { 
    6868 
    69   gdbm_level = "Doc"; 
     69  textlevel = "Doc"; 
    7070} 
    7171 
     
    7979} 
    8080 
    81 void lucenesearchclass::set_gdbm_level(const text_t &level) { 
    82   gdbm_level = level; 
    83    
     81void lucenesearchclass::set_text_level(const text_t &textlevel_arg) 
     82{ 
     83  textlevel = textlevel_arg; 
    8484} 
    8585 
     
    228228                    text_t &output) { 
    229229 
    230   // we now get the document directly by lucenegdbmsource, so don't use this  
     230  // we now get the document directly by lucenesource, so don't use this  
    231231  // method 
    232232  return false; 
  • gsdl/trunk/src/colservr/lucenesearch.h

    r12246 r15594  
    7474           char *&UDoc, int &ULen); 
    7575  */ 
    76   void set_gdbm_level(const text_t &level); 
    77   text_t gdbm_level; // the default level used for retrieval, and in the gdbm file  
     76 
     77  void set_text_level(const text_t &textlevel_arg); 
     78  text_t textlevel; 
    7879 
    7980  // used to clear any cached databases for persistent versions of  
  • gsdl/trunk/src/colservr/lucenesource.cpp

    r15593 r15594  
    9090  doc.clear(); 
    9191  db_ptr->closedatabase();  // Important that local library doesn't leave any files open 
    92   expat_document(full_path_to_doc, ((lucenesearchclass*)textsearchptr)->gdbm_level, text_t(docnum), doc); 
     92  expat_document(full_path_to_doc, ((lucenesearchclass*)textsearchptr)->textlevel, text_t(docnum), doc); 
    9393  return true; 
    9494} 
  • gsdl/trunk/src/colservr/mgppqueryfilter.cpp

    r15558 r15594  
    9797    } 
    9898  } else if (key == "textlevel") { 
    99       ((mgppsearchclass *)textsearchptr)->set_gdbm_level( cfgline[0]); 
     99      ((mgppsearchclass *)textsearchptr)->set_text_level(cfgline[0]); 
    100100  } else if (key == "indexstem") { 
    101101    ((mgppsearchclass *)textsearchptr)->set_indexstem (cfgline[0]); 
  • gsdl/trunk/src/colservr/mgppsearch.cpp

    r13780 r15594  
    6161  : searchclass() { 
    6262 
    63   gdbm_level = "Doc"; 
     63  textlevel = "Doc"; 
    6464  indexData = NULL; 
    6565} 
     
    8181} 
    8282 
    83 void mgppsearchclass::set_gdbm_level(const text_t &level) { 
    84   gdbm_level = level; 
    85    
    86 } 
    87 void mgppsearchclass::set_indexstem(const text_t &stem) { 
     83void mgppsearchclass::set_text_level(const text_t &textlevel_arg) 
     84{ 
     85  textlevel = textlevel_arg; 
     86} 
     87 
     88void mgppsearchclass::set_indexstem(const text_t &stem) 
     89{ 
    8890  indexstem = stem; 
    89    
    9091} 
    9192 
     
    160161   
    161162  //set the level for results 
    162   SetCStr(level, gdbm_level.getcstr()); 
     163  SetCStr(level, textlevel.getcstr()); 
    163164 
    164165   
     
    308309  UCArray doctext; 
    309310  UCArray level; 
    310   SetCStr(level, gdbm_level.getcstr()); 
     311  SetCStr(level, textlevel.getcstr()); 
    311312  if (!GetDocText(textdata, level, (unsigned long)docnum, doctext)) { 
    312313    cout<<"couldn't retrieve document text\n"; 
  • gsdl/trunk/src/colservr/mgppsearch.h

    r9937 r15594  
    7676  */ 
    7777   
    78   void set_gdbm_level(const text_t &level); 
     78  void set_text_level(const text_t &textlevel_arg); 
    7979   
    8080  void set_indexstem(const text_t &indexstem); 
     
    8383  // Greenstone like the Windows local library 
    8484  void unload_database (); 
     85 
    8586 protected: 
    8687   
    87   text_t gdbm_level; // the default level used for retrieval, and in the gdbm file  
     88  text_t textlevel; 
    8889  text_t indexstem; // the stem of the index file names 
    8990  IndexData *indexData; // the index data structure needed for MGQuery - keep