Changeset 6584 for trunk/gsdl/src
- Timestamp:
- 2004-01-22T14:17:30+13:00 (20 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/collectserver.cpp
r5868 r6584 101 101 collectinfo.searchTypes = cfgline; 102 102 } 103 103 else if (key == "separate_cjk") { 104 if (value == "true") collectinfo.isSegmented = true; 105 else collectinfo.isSegmented = false; 106 } 104 107 // What have we set in our collect.cfg file : document or collection ? 105 108 else if (key == "authenticate") collectinfo.authenticate = value; -
trunk/gsdl/src/recpt/comtypes.cpp
r5024 r6584 53 53 isPublic=true; 54 54 isBeta=false; 55 isSegmented=false; 55 56 languages.erase(languages.begin(), languages.end()); 56 57 ccsCols.erase(ccsCols.begin(), ccsCols.end()); -
trunk/gsdl/src/recpt/comtypes.h
r5024 r6584 90 90 bool isPublic; 91 91 bool isBeta; 92 bool isSegmented; 92 93 unsigned long buildDate; 93 94 text_tarray ccsCols; // empty if collection does not use cross-collection searching -
trunk/gsdl/src/recpt/documentaction.cpp
r5917 r6584 1008 1008 1009 1009 if (!args["q"].empty() && args.getintarg("hl")) { 1010 1011 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, collection, logout); 1012 bool segment = false; 1013 if (cinfo != NULL) { 1014 segment = cinfo->isSegmented; 1015 } 1010 1016 FilterRequest_t request; 1011 1017 comerror_t err; 1012 1018 request.filterResultOptions = FRmatchTerms; 1013 1019 text_t formattedstring = args["q"]; 1014 format_querystring (formattedstring, args.getintarg("b") );1020 format_querystring (formattedstring, args.getintarg("b"), segment); 1015 1021 set_queryfilter_options (request, formattedstring, args); 1016 1022 collectproto->filter (args["c"], request, queryresponse, err, logout); -
trunk/gsdl/src/recpt/queryaction.cpp
r5762 r6584 632 632 633 633 // sets the selection box macros _hselection_, _jselection_, _nselection_ _gselection_, fqfselection_ 634 void queryaction::set_option_macro (const text_t ¯oname, text_t current_value, bool display_single, bool add_js_update, 635 const FilterOption_t &option, displayclass &disp) { 634 void queryaction::set_option_macro (const text_t ¯oname, 635 text_t current_value, 636 bool display_single, 637 bool add_js_update, 638 const FilterOption_t &option, 639 displayclass &disp) { 636 640 637 641 if (option.validValues.empty()) return; … … 1082 1086 isapprox isApprox = Exact; 1083 1087 1088 // what to do about segmentation for multiple colls?? 1089 bool segment = false; 1084 1090 text_t formattedstring = ""; 1085 get_formatted_query_string(formattedstring, args, disp, logout);1091 get_formatted_query_string(formattedstring, segment, args, disp, logout); 1086 1092 1087 1093 if (formattedstring.empty()) { … … 1288 1294 } 1289 1295 1296 bool segment = cinfo->isSegmented; 1290 1297 browserclass *bptr = browsers->getbrowser (browsertype); 1291 1298 … … 1307 1314 request.filterResultOptions = FROID | FRmetadata | FRtermFreq; 1308 1315 text_t formattedstring = ""; 1309 get_formatted_query_string(formattedstring, args, disp, logout);1316 get_formatted_query_string(formattedstring, segment, args, disp, logout); 1310 1317 1311 1318 … … 1354 1361 // also adds dates if appropriate in text search 1355 1362 void queryaction::get_formatted_query_string (text_t &formattedstring, 1363 bool segment, 1356 1364 cgiargsclass &args, 1357 1365 displayclass &disp, … … 1360 1368 formattedstring = args["q"]; 1361 1369 // remove & | ! for simple search, insert spaces for chinese 1362 format_querystring (formattedstring, args.getintarg("b") );1370 format_querystring (formattedstring, args.getintarg("b"), segment); 1363 1371 if (args["ct"]=="1") { // mgpp - we need to add in the field info 1364 1372 format_field_info(formattedstring, args["fqf"]); -
trunk/gsdl/src/recpt/queryaction.h
r4937 r6584 73 73 int numDocs, isapprox isApprox); 74 74 75 void get_formatted_query_string (text_t &formattedstring, cgiargsclass &args, 75 void get_formatted_query_string (text_t &formattedstring, bool segment, 76 cgiargsclass &args, 76 77 displayclass &disp, ostream &logout); 77 78 void define_query_interface(displayclass &disp, cgiargsclass &args, -
trunk/gsdl/src/recpt/querytools.cpp
r4757 r6584 154 154 } 155 155 156 void format_querystring (text_t &querystring, int querymode ) {156 void format_querystring (text_t &querystring, int querymode, bool segment) { 157 157 text_t formattedstring; 158 158 159 if (querymode == 1 && !segment) return; 160 159 161 text_t::const_iterator here = querystring.begin(); 160 162 text_t::const_iterator end = querystring.end(); … … 171 173 *here == '!' || *here == '&')) { 172 174 formattedstring.push_back(' '); 173 } else {175 } else if (segment) { 174 176 if ((*here >= 0x4e00 && *here <= 0x9fa5) || 175 177 (*here >= 0xf900 && *here <= 0xfa2d)) { … … 184 186 space = false; 185 187 } 188 189 } else { 190 formattedstring.push_back (*here); 186 191 } 187 192 here ++; -
trunk/gsdl/src/recpt/querytools.h
r4757 r6584 40 40 void set_more_queryfilter_options (FilterRequest_t &request, cgiargsclass &args); 41 41 42 void format_querystring (text_t &querystring, int querymode );42 void format_querystring (text_t &querystring, int querymode, bool segment); 43 43 44 44 void add_dates(text_t &querystring, int startdate, int enddate,
Note:
See TracChangeset
for help on using the changeset viewer.