Changeset 2545
- Timestamp:
- 2001-06-13T15:16:57+12:00 (23 years ago)
- Location:
- trunk/gsdl/src/colservr
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/collectset.cpp
r2344 r2545 105 105 106 106 if (buildtype == "mg") { 107 mgsearch class *mgsearch= new mgsearchclass();107 mgsearch = new mgsearchclass(); 108 108 109 109 // add a query filter … … 118 118 mggdbmsource->set_mgsearchptr (mgsearch); 119 119 cserver->add_source (mggdbmsource); 120 } 121 #ifndef __WIN32__ 122 123 else if (buildtype == "mgpp") { 124 125 mgppsearchclass *mgsearch = new mgppsearchclass(); 120 121 } else if (buildtype == "mgpp") { 122 123 mgppsearch = new mgppsearchclass(); 126 124 127 125 // add a query filter 128 126 mgppqueryfilterclass *queryfilter = new mgppqueryfilterclass(); 129 127 queryfilter->set_gdbmptr (gdbmhandler); 130 queryfilter->set_mgsearchptr (mg search);128 queryfilter->set_mgsearchptr (mgppsearch); 131 129 cserver->add_filter (queryfilter); 132 130 … … 137 135 cserver->add_source (mggdbmsource); 138 136 } 139 #endif140 137 141 138 // inform collection server and everything it contains about its … … 231 228 // do this would be preferable though - Stefan. 232 229 text_t buildtype = "mg"; // mg is default 233 // (for now we'll just ignore mgpp if on windows) 234 #ifndef __WIN32__ 230 235 231 text_tarray cfgline; 236 232 text_t key; … … 253 249 } 254 250 delete build_cfgc; 255 #endif256 251 257 252 collectserver *cserver = new collectserver(); … … 269 264 270 265 if (buildtype == "mg") { 271 mgsearch class *mgsearch= new mgsearchclass();266 mgsearch = new mgsearchclass(); 272 267 273 268 // add a query filter … … 282 277 mggdbmsource->set_mgsearchptr (mgsearch); 283 278 cserver->add_source (mggdbmsource); 284 } 285 286 #ifndef __WIN32__ 287 288 else if (buildtype == "mgpp") { 279 280 } else if (buildtype == "mgpp") { 289 281 290 mgppsearch class *mgsearch= new mgppsearchclass();282 mgppsearch = new mgppsearchclass(); 291 283 292 284 // add a query filter 293 285 mgppqueryfilterclass *queryfilter = new mgppqueryfilterclass(); 294 286 queryfilter->set_gdbmptr (gdbmhandler); 295 queryfilter->set_mgsearchptr (mg search);287 queryfilter->set_mgsearchptr (mgppsearch); 296 288 cserver->add_filter (queryfilter); 297 289 … … 303 295 304 296 } 305 #endif306 297 307 298 // inform collection server and everything it contains about its … … 324 315 // cleans up all collectservers when the program exits. 325 316 void collectset::remove_collection (const text_t &collection, ostream &logout) { 317 318 // first unload any cached mg databases - we may need to do something 319 // similar to this for mgpp too 320 if (mgsearch != NULL) { 321 mgsearch->unload_database(); 322 } 323 324 // now delete the collection server object 326 325 collectservermapclass::iterator here = cservers.begin(); 327 326 collectservermapclass::iterator end = cservers.end(); -
trunk/gsdl/src/colservr/collectset.h
r1886 r2545 16 16 protected: 17 17 collectservermapclass cservers; 18 mgsearchclass *mgsearch; 19 mgppsearchclass *mgppsearch; 18 20 int noofservers; 19 21 text_t httpdomain; -
trunk/gsdl/src/colservr/mgppsearch.cpp
r1908 r2545 155 155 // term info 156 156 termfreqclass term; 157 for (int i=0; i<(int)queryResult.termFreqs.size(); i++) {157 for (int k=0; k<(int)queryResult.termFreqs.size(); k++) { 158 158 term.clear(); 159 term.termstr = GetCStr(queryResult.termFreqs[ i].term);159 term.termstr = GetCStr(queryResult.termFreqs[k].term); 160 160 term.termstemstr = term.termstr; 161 term.termfreq = queryResult.termFreqs[ i].termFreq;161 term.termfreq = queryResult.termFreqs[k].termFreq; 162 162 queryresult.terms.push_back(term); 163 163 queryresult.orgterms.push_back(term); // should this change?? -
trunk/gsdl/src/colservr/mgsearch.cpp
r2211 r2545 22 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 23 * 24 * $Id$25 *26 24 *********************************************************************/ 27 28 /*29 $Log$30 Revision 1.33 2001/03/20 09:34:41 sjboddie31 removed some debugging lines32 33 Revision 1.32 2001/03/12 23:57:17 say134 added command to strip the corbaserver (makes it much smaller)35 36 Revision 1.31 2001/02/19 02:02:00 sjboddie37 Set mg's accumulator method back to 'list' as the recent change appeared38 to introduce a new (and more serious) bug while fixing the old bug. For39 now we'll just have to live with it the way it is.40 41 Revision 1.30 2001/02/15 22:58:11 kjm1842 added a comment43 44 Revision 1.29 2001/02/15 03:57:02 kjm1845 changed accumulator_method for mg to be array rather than list - it was46 getting some weird results with ranked searches47 48 Revision 1.28 2001/01/25 18:26:44 cs02549 Included CORBA branch for first time50 51 Revision 1.22.2.1 2000/04/04 15:02:32 cs02552 Corba first commit53 54 Revision 1.22 1999/09/24 02:41:21 rjmcnab55 change to use has_unicode_letdig in text_t56 57 Revision 1.21 1999/09/21 21:41:41 sjboddie58 fixed an error in what I committed last59 60 Revision 1.20 1999/09/21 11:59:26 sjboddie61 added Maxdocs queryfilter option (which may be -1 for 'all)62 63 Revision 1.19 1999/09/07 22:52:52 rjmcnab64 Seems to be an error in mg for retrieving documents using a paragraph65 based index for some cases. Just added a work around (loads the default66 index every time).67 68 Revision 1.18 1999/09/07 04:57:22 sjboddie69 added gpl notice70 71 Revision 1.17 1999/08/31 22:42:41 rjmcnab72 A couple of minor things.73 74 Revision 1.16 1999/08/25 04:51:06 sjboddie75 small change to allow for searching using boolean operators76 77 Revision 1.15 1999/07/16 08:35:03 rjmcnab78 Fixed a weird bug to do with a faulty case statement.79 80 Revision 1.14 1999/07/16 03:42:22 sjboddie81 changed isApprox82 83 Revision 1.13 1999/07/16 00:12:46 sjboddie84 removed all the old post-processing stuff85 86 Revision 1.12 1999/07/07 06:17:47 rjmcnab87 broke search_index into index+subcollection+language88 within mgsearch89 90 Revision 1.11 1999/07/05 21:06:43 rjmcnab91 Disabled quoted strings.92 93 Revision 1.10 1999/07/01 09:29:19 rjmcnab94 Changes for better reporting of number documents which match a query. Changes95 should still work as before with older versions of mg.96 97 Revision 1.9 1999/07/01 03:54:48 rjmcnab98 Added code to plug in the equivalent terms of each of the query terms.99 Also added a function to get a raw utf8 encoded mg document (for speeding100 up a phrase matching function)101 102 Revision 1.8 1999/06/30 04:04:12 rjmcnab103 made stemming functions available from mgsearch and made the stems104 for the query terms available in queryinfo105 106 Revision 1.7 1999/06/27 22:07:27 sjboddie107 got rid of all the old functions for dealing with dir indexes108 109 Revision 1.6 1999/06/09 00:41:32 sjboddie110 phrase searching now uses case-folding if it's turned on111 112 Revision 1.5 1999/02/21 22:31:35 rjmcnab113 114 Removed locateinfo.115 116 Revision 1.4 1999/02/03 01:13:27 sjboddie117 118 Got interface to handle subcollections and language subcollections -119 committed changes made to some of the collections120 121 Revision 1.3 1999/01/19 01:38:17 rjmcnab122 123 Made the source more portable.124 125 Revision 1.2 1999/01/12 01:51:02 rjmcnab126 127 Standard header.128 129 Revision 1.1 1999/01/08 09:02:16 rjmcnab130 131 Moved from src/library.132 133 */134 25 135 26 #include "gsdlconf.h" … … 659 550 } 660 551 552 // unload_database simply calls mgq's close_all_databases function to clear 553 // any cached databases - this is useful when attempting to completely 554 // remove all trace of a collectionserver at runtime (when using a 555 // persistent version of Greenstone like the windows local library) 556 void mgsearchclass::unload_database () { 557 close_all_databases(); 558 } -
trunk/gsdl/src/colservr/mgsearch.h
r1907 r2545 53 53 // the search results are returned in queryresults 54 54 // search returns 'true' if it was able to do a search 55 55 bool search(const queryparamclass &queryparams, 56 56 queryresultsclass &queryresults); 57 57 … … 79 79 char *&UDoc, int &ULen); 80 80 81 // unload_database simply calls mgq's close_all_databases function to 82 // clear any cached databases - this is useful when attempting to 83 // completely remove all trace of a collectionserver at runtime (when 84 // using a persistent version of Greenstone like the windows local 85 // library) 86 void mgsearchclass::unload_database (); 87 88 81 89 protected: 82 90 -
trunk/gsdl/src/colservr/win32.mak
r2338 r2545 35 35 DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX 36 36 INCLUDES = -I"$(GSDLHOME)" -I"$(GSDLHOME)\lib" -I"$(GSDLHOME)\src\colservr" \ 37 -I"$(GSDLHOME)\src\mgpp\lib" -I"$(GSDLHOME)\src\mgpp\text" \ 37 38 -I"$(GSDLHOME)\src\recpt" -I"$(GSDLHOME)\packages\mg" \ 38 39 -I"$(GSDLHOME)\packages\mg\lib" -I"$(GSDLHOME)\packages\mg\src\text" \ … … 60 61 colservrconfig.h maptools.h filter.h source.h browsefilter.h \ 61 62 queryfilter.h mgqueryfilter.h mggdbmsource.h phrasesearch.h \ 62 phrasequeryfilter.h collectset.h 63 phrasequeryfilter.h collectset.h mgppsearch.h mgppqueryfilter.h 63 64 64 65 SOURCES = mgq.c search.cpp mgsearch.cpp querycache.cpp queryinfo.cpp \ … … 66 67 source.cpp browsefilter.cpp queryfilter.cpp mgqueryfilter.cpp \ 67 68 mggdbmsource.cpp phrasesearch.cpp phrasequeryfilter.cpp \ 68 collectset.cpp 69 collectset.cpp mgppsearch.cpp mgppqueryfilter.cpp 69 70 70 71 OBJECTS = mgq.obj search.obj mgsearch.obj querycache.obj queryinfo.obj \ … … 72 73 source.obj browsefilter.obj queryfilter.obj mgqueryfilter.obj \ 73 74 mggdbmsource.obj phrasesearch.obj phrasequeryfilter.obj \ 74 collectset.obj 75 collectset.obj mgppsearch.obj mgppqueryfilter.obj 75 76 76 77 all : gsdlcolservr.lib
Note:
See TracChangeset
for help on using the changeset viewer.