Ignore:
Timestamp:
2000-08-02T12:58:29+12:00 (24 years ago)
Author:
kjm18
Message:

mgpp incorporated. the old mgsearchclass and queryfilterclass are changed.
Have a base searchclass, from which mgsearchclass and mgppsearchclass inherit.
Have a base queryfilterclass, from which mgqueryfilterclass and
mgppqueryfilterclass inherit. librarymain in recpt should choose the appropriate
type (mg vs mgpp) for each collection.

File:
1 edited

Legend:

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

    r1306 r1324  
    232232
    233233mgsearchclass::mgsearchclass ()
    234 {
    235   cache = new querycache (RESULTCACHESIZE);
     234  : searchclass() {
     235 
    236236}
    237237
     
    243243      cache = NULL;
    244244    }
    245 }
    246 
    247 
    248 void mgsearchclass::setcollectdir (const text_t &thecollectdir)
    249 {
    250   collectdir = thecollectdir;
    251245}
    252246
     
    308302bool mgsearchclass::search(const queryparamclass &queryparams,
    309303               queryresultsclass &queryresults) {
    310   assert (cache != NULL);
     304  //  assert (cache != NULL);
    311305
    312306  queryresults.clear();
    313 
     307  cerr << "mgsearch start of search"<<endl;
    314308  // first check the cache
    315   if (cache->find(queryparams, queryresults)) return true;
    316 
     309  if (cache != NULL) {
     310    if (cache->find(queryparams, queryresults)) return true;
     311  }
    317312  // make sure there is a query to be processed
    318313  if (!has_unicode_letdig(queryparams.querystring)) return true;
     
    320315  if (makeindexcurrent (queryparams.index, queryparams.subcollection,
    321316            queryparams.language, queryparams.collection)) {
     317    cerr << "made index current "<<endl;
    322318    setsearchmode (queryparams);
    323319    submitquery (queryparams);
    324320    getresults (queryparams, queryresults);
     321    cerr << "got results"<<endl;
    325322    return true;
    326323  }
     
    512509  return (bool)databaseloaded;
    513510}
     511
Note: See TracChangeset for help on using the changeset viewer.