Changeset 10789
- Timestamp:
- 2005-10-28T15:41:33+13:00 (18 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/collectserver.cpp
r9934 r10789 80 80 else collectinfo.isBeta = false; 81 81 } else if ((key == "ccscols") || (key == "supercollection")) collectinfo.ccsCols = cfgline; 82 else if (key == "supercollectionoptions") { 83 text_tarray::const_iterator begin = cfgline.begin(); 84 text_tarray::const_iterator end = cfgline.end(); 85 while(begin != end) { 86 87 if (*begin == "uniform_search_results_formatting") { 88 collectinfo.ccsOptions |= CCSUniformSearchResultsFormatting; 89 } 90 begin++; 91 } 92 } 82 93 else if (key == "builddate") collectinfo.buildDate = value.getint(); 83 94 else if (key == "languages") collectinfo.languages = cfgline; -
trunk/gsdl/src/recpt/comtypes.cpp
r9930 r10789 56 56 languages.erase(languages.begin(), languages.end()); 57 57 ccsCols.erase(ccsCols.begin(), ccsCols.end()); 58 ccsOptions = 0; 58 59 buildDate=0; 59 60 buildType.clear(); -
trunk/gsdl/src/recpt/comtypes.h
r9930 r10789 72 72 typedef map<text_t, text_tmap, lttext_t> collectionmeta_map; // maps meta name to langmap 73 73 74 #define CCSUniformSearchResultsFormatting 1 75 74 76 struct ColInfoResponse_t { 75 77 void clear (); … … 83 85 unsigned long buildDate; 84 86 text_tarray ccsCols; // empty if collection does not use cross-collection searching 87 int ccsOptions; // uses #defines from above 85 88 text_tarray languages; 86 89 unsigned long numDocs; // 0 if not known -
trunk/gsdl/src/recpt/queryaction.cpp
r10361 r10789 1107 1107 1108 1108 map<text_t, int, lttext_t> termfreqs; 1109 1110 // just check the main col for formatting info - use individual format statements, or the main one? 1111 1112 browserclass *bptr = browsers->getbrowser (browsertype); 1113 1114 text_t main_col = args["c"]; 1115 cinfo = recpt->get_collectinfo_ptr (collectproto, main_col, logout); 1116 if (cinfo == NULL) { 1117 logout << "ERROR (query_action::search_multiple_collections): get_collectinfo_ptr returned NULL for '"<<main_col<<"'\n"; 1118 return false; 1119 } 1120 1121 bool use_main_col_format = false; 1122 if (cinfo->ccsOptions & CCSUniformSearchResultsFormatting) { 1123 use_main_col_format = true; 1124 } 1125 1126 request.fields.erase (request.fields.begin(), request.fields.end()); 1127 request.getParents = false; 1128 bptr->load_metadata_defaults (request.fields); 1129 1130 text_t formatstring; 1131 format_t *formatlistptr = new format_t(); 1132 if (use_main_col_format) { 1133 // just get one format for main coll and use it for each subcol 1134 if (!get_formatstring (classification, browsertype, 1135 cinfo->format, formatstring)) { 1136 formatstring = bptr->get_default_formatstring(); 1137 } 1138 1139 parse_formatstring (formatstring, formatlistptr, request.fields, request.getParents); 1140 } 1141 1109 1142 while (col_here != col_end) { 1110 1111 request.fields.erase (request.fields.begin(), request.fields.end());1112 request.getParents = false;1113 1143 1114 1144 collectproto = protos->getrecptproto (*col_here, logout); … … 1125 1155 continue; 1126 1156 } 1157 1158 if (!use_main_col_format) { 1159 request.fields.erase (request.fields.begin(), request.fields.end()); 1160 request.getParents = false; 1161 bptr->load_metadata_defaults (request.fields); 1162 1163 //browserclass *bptr = browsers->getbrowser (browsertype); 1164 1165 // get the formatstring if there is one 1166 if (!get_formatstring (classification, browsertype, 1167 cinfo->format, formatstring)) { 1168 formatstring = bptr->get_default_formatstring(); 1169 } 1170 1171 formatlistptr = new format_t(); 1172 parse_formatstring (formatstring, formatlistptr, request.fields, request.getParents); 1173 } 1127 1174 1128 browserclass *bptr = browsers->getbrowser (browsertype);1129 1130 // get the formatstring if there is one1131 text_t formatstring;1132 if (!get_formatstring (classification, browsertype,1133 cinfo->format, formatstring))1134 formatstring = bptr->get_default_formatstring();1135 1136 bptr->load_metadata_defaults (request.fields);1137 1138 format_t *formatlistptr = new format_t();1139 parse_formatstring (formatstring, formatlistptr, request.fields, request.getParents);1140 1141 1175 colinfo_t thiscolinfo; 1142 1176 thiscolinfo.formatlistptr = formatlistptr;
Note:
See TracChangeset
for help on using the changeset viewer.