Changeset 613
- Timestamp:
- 1999-09-22T00:01:07+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/queryfilter.cpp
r534 r613 28 28 /* 29 29 $Log$ 30 Revision 1.17 1999/09/21 12:01:07 sjboddie 31 added Maxdocs queryfilter option (which may be -1 for 'all') 32 30 33 Revision 1.16 1999/09/07 04:57:24 sjboddie 31 34 added gpl notice … … 90 93 #include <assert.h> 91 94 92 #define MAXDOCS 200 // note that maxdocs must be at least as large93 // as the highest possible value of EndResults94 95 95 96 // some useful functions … … 290 291 query.casefolding = (filterOptions["Casefold"].defaultValue == "true"); 291 292 query.stemming = (filterOptions["Stem"].defaultValue == "true"); 292 query.maxdocs = MAXDOCS; // default for single query293 query.maxdocs = filterOptions["Maxdocs"].defaultValue.getint(); 293 294 294 295 OptionValue_tarray::const_iterator options_here = request.filterOptions.begin(); … … 319 320 // "all", needed when combining queries where the document results are needed 320 321 if (need_matching_docs (request.filterResultOptions)) query.maxdocs = -1; 321 else query.maxdocs = MAXDOCS; // "all"322 else query.maxdocs = filterOptions["Maxdocs"].defaultValue.getint(); 322 323 323 324 } else if ((*options_here).name == "StartResults") { … … 342 343 } else if ((*options_here).name == "Language") { 343 344 query.language = (*options_here).value; 345 } else if ((*options_here).name == "Maxdocs") { 346 query.maxdocs = (*options_here).value.getint(); 344 347 } else { 345 348 logout << text_t2ascii … … 503 506 filtopt.validValues.push_back("some"); 504 507 filtopt.validValues.push_back("all"); 505 filterOptions[" QueryType"] = filtopt;508 filterOptions["MatchMode"] = filtopt; 506 509 507 510 // -- onePerTerm Term string ??? … … 556 559 filtopt.defaultValue = ""; 557 560 filterOptions["Language"] = filtopt; 561 562 // -- onePerQuery Maxdocs integer 563 filtopt.clear(); 564 filtopt.name = "Maxdocs"; 565 filtopt.type = FilterOption_t::integert; 566 filtopt.repeatable = FilterOption_t::onePerQuery; 567 filtopt.defaultValue = "200"; 568 filtopt.validValues.push_back("-1"); 569 filtopt.validValues.push_back("1000"); 570 filterOptions["Maxdocs"] = filtopt; 558 571 } 559 572
Note:
See TracChangeset
for help on using the changeset viewer.