Changeset 12276
- Timestamp:
- 2006-07-24T02:57:51+12:00 (18 years ago)
- Location:
- trunk/gsdl/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/lucenesearch.cpp
r12246 r12276 123 123 if (*here == '"') escaped_utf8querystring.push_back('\\'); 124 124 escaped_utf8querystring.push_back(*here); 125 here++;125 ++here; 126 126 } 127 127 cerr << "**** escaped query string = " << escaped_utf8querystring << endl; … … 130 130 text_t cmd = "\"" + filename_cat(gsdlhome, "bin", "script", "lucene_query.pl") + "\""; 131 131 cmd += (text_t)" \""+indexname + (text_t)"\" \"" + escaped_utf8querystring + (text_t)"\""; 132 if (!queryparams.sortfield.empty()) { 133 cmd += " \"" + queryparams.sortfield + "\""; 134 } 132 135 cerr << "Lucene command: " << cmd << endl; 133 136 -
trunk/gsdl/src/colservr/queryfilter.cpp
r9937 r12276 90 90 query.maxdocs = filterOptions["Maxdocs"].defaultValue.getint(); 91 91 query.level = filterOptions["Level"].defaultValue; 92 query.sortfield = filterOptions["SortField"].defaultValue; 92 93 OptionValue_tarray::const_iterator options_here = request.filterOptions.begin(); 93 94 OptionValue_tarray::const_iterator options_end = request.filterOptions.end(); … … 115 116 query.stemming = (filterOptions["Stem"].defaultValue == "true"); 116 117 query.level = filterOptions["Level"].defaultValue; 118 query.sortfield = filterOptions["SortField"].defaultValue; 117 119 // "all", needed when combining queries where the document results are needed 118 120 if (need_matching_docs (request.filterResultOptions)) query.maxdocs = -1; … … 146 148 } else if ((*options_here).name == "Level") { 147 149 query.level = (*options_here).value; 150 } else if ((*options_here).name == "SortField") { 151 query.sortfield = (*options_here).value; 148 152 } else { 149 153 logout << text_t2ascii -
trunk/gsdl/src/colservr/queryinfo.cpp
r9620 r12276 47 47 maxdocs = -1; // all 48 48 maxnumeric = 4; // must default to the same value as mg_passes 49 sortfield.clear(); 49 50 } 50 51 … … 64 65 maxdocs = q.maxdocs; 65 66 maxnumeric = q.maxnumeric; 67 sortfield = q.sortfield; 66 68 67 69 return *this; … … 82 84 (x.stemming == y.stemming) && 83 85 (x.maxdocs == y.maxdocs) && 84 (x.maxnumeric == y.maxnumeric)); 86 (x.maxnumeric == y.maxnumeric) && 87 (x.sortfield == y.sortfield)); 85 88 } 86 89 … … 107 110 outs << " maxdocs = \"" << q.maxdocs << "\"\n"; 108 111 outs << " maxnumeric = \"" << q.maxnumeric << "\"\n"; 112 outs << " sortfield = \"" << q.sortfield << "\"\n"; 109 113 outs << "\n"; 110 114 -
trunk/gsdl/src/colservr/queryinfo.h
r4217 r12276 66 66 int maxdocs; 67 67 int maxnumeric; 68 text_t sortfield; // Field to use for sorting result set (currently used by lucene) 68 69 69 70 queryparamclass (); -
trunk/gsdl/src/recpt/queryaction.cpp
r12161 r12276 429 429 argsinfo.addarginfo (NULL, arg_ainfo); 430 430 431 // "sf" - Sort field. Set to field to be used for sorting search reult 432 // set (only implemented for lucene collections at present). 433 arg_ainfo.shortname = "sf"; 434 arg_ainfo.longname = "sort field"; 435 arg_ainfo.multiplechar = true; 436 arg_ainfo.defaultstatus = cgiarginfo::weak; 437 arg_ainfo.argdefault = g_EmptyText; 438 arg_ainfo.savedarginfo = cgiarginfo::must; 439 argsinfo.addarginfo (NULL, arg_ainfo); 431 440 } 432 441 -
trunk/gsdl/src/recpt/querytools.cpp
r11987 r12276 138 138 option.name = "Level"; 139 139 option.value = args["g"]; 140 request.filterOptions.push_back (option); 141 } 142 143 if (!args["sf"].empty()) { // sort field for lucene 144 option.name = "SortField"; 145 option.value = args["sf"]; 140 146 request.filterOptions.push_back (option); 141 147 }
Note:
See TracChangeset
for help on using the changeset viewer.