Changeset 501
- Timestamp:
- 1999-09-01T10:47:09+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/queryfilter.cpp
r398 r501 12 12 /* 13 13 $Log$ 14 Revision 1.15 1999/08/31 22:47:09 rjmcnab 15 Added matchmode option for some and all. 16 14 17 Revision 1.14 1999/07/16 03:42:21 sjboddie 15 18 changed isApprox … … 68 71 #include <assert.h> 69 72 70 #define MAXDOCS 200 // note that maxdocs must be at least as large71 // as the highest possible value of EndResults73 #define MAXDOCS 50000 // note that maxdocs must be at least as large 74 // as the highest possible value of EndResults 72 75 73 76 // some useful functions … … 265 268 query.querystring.clear(); 266 269 query.search_type = (filterOptions["QueryType"].defaultValue == "ranked"); 270 query.match_mode = (filterOptions["MatchMode"].defaultValue == "all"); 267 271 query.casefolding = (filterOptions["Casefold"].defaultValue == "true"); 268 272 query.stemming = (filterOptions["Stem"].defaultValue == "true"); … … 290 294 query.querystring.clear(); 291 295 query.search_type = (filterOptions["QueryType"].defaultValue == "ranked"); 296 query.match_mode = (filterOptions["MatchMode"].defaultValue == "all"); 292 297 query.casefolding = (filterOptions["Casefold"].defaultValue == "true"); 293 298 query.stemming = (filterOptions["Stem"].defaultValue == "true"); … … 303 308 } else if ((*options_here).name == "QueryType") { 304 309 query.search_type = ((*options_here).value == "ranked"); 310 } else if ((*options_here).name == "MatchMode") { 311 query.match_mode = ((*options_here).value == "all"); 312 if (query.match_mode == 1) query.maxdocs = -1; 305 313 } else if ((*options_here).name == "Term") { 306 314 query.querystring = (*options_here).value; … … 468 476 filterOptions["QueryType"] = filtopt; 469 477 478 // -- onePerQuery MatchMode enumerated (some, all) 479 filtopt.clear(); 480 filtopt.name = "MatchMode"; 481 filtopt.type = FilterOption_t::enumeratedt; 482 filtopt.repeatable = FilterOption_t::onePerQuery; 483 filtopt.defaultValue = "some"; 484 filtopt.validValues.push_back("some"); 485 filtopt.validValues.push_back("all"); 486 filterOptions["QueryType"] = filtopt; 487 470 488 // -- onePerTerm Term string ??? 471 489 filtopt.clear(); … … 614 632 // open the database 615 633 gdbmptr->setlogout(&logout); 616 if (!gdbmptr->opendatabase (gdbm_filename )) {634 if (!gdbmptr->opendatabase (gdbm_filename, GDBM_READER, 100, false)) { 617 635 // most likely a system problem (we have already checked that the 618 636 // gdbm database exists)
Note:
See TracChangeset
for help on using the changeset viewer.