Changeset 12246 for trunk/gsdl/src/colservr/lucenesearch.cpp
- Timestamp:
- 2006-07-19T14:45:46+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/lucenesearch.cpp
r11162 r12246 44 44 45 45 #include "expat_resultset.h" 46 47 46 48 47 text_t lucenesearchclass::getindexsuffix(const queryparamclass &qp) { … … 129 128 cerr << "***** index name = " << indexname << endl; 130 129 131 text_t cmd = "\"" +filename_cat(getenv("GSDLHOME"), "bin", "script", "lucene_query.pl")+"\"";130 text_t cmd = "\"" + filename_cat(gsdlhome, "bin", "script", "lucene_query.pl") + "\""; 132 131 cmd += (text_t)" \""+indexname + (text_t)"\" \"" + escaped_utf8querystring + (text_t)"\""; 133 132 cerr << "Lucene command: " << cmd << endl; … … 135 134 text_t xml_text = ""; 136 135 136 // I don't want to do this, but I have to. 137 text_t gsdlhome_env = "GSDLHOME=" + gsdlhome; 138 putenv(gsdlhome_env.getcstr()); 139 137 140 #ifdef __WIN32__ 141 putenv("GSDLOS=windows"); 142 138 143 //FILE *PIN = _popen(cmd.getcstr(), "r"); // didn't seem to work 139 144 cmd = (text_t)"perl -S "+cmd; … … 154 159 } 155 160 #else 161 putenv("GSDLOS=linux"); 162 156 163 FILE *PIN = popen(cmd.getcstr(), "r"); 157 164 … … 169 176 170 177 #endif 178 171 179 expat_resultset(xml_text,queryresult); 172 180 … … 344 352 } 345 353 346 347 348 349 354 void lucenesearchclass::set_gsdlhome (const text_t &gh) 355 { 356 gsdlhome = gh; 357 }
Note:
See TracChangeset
for help on using the changeset viewer.