Changeset 501


Ignore:
Timestamp:
1999-09-01T10:47:09+12:00 (25 years ago)
Author:
rjmcnab
Message:

Added matchmode option for some and all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/colservr/queryfilter.cpp

    r398 r501  
    1212/*
    1313   $Log$
     14   Revision 1.15  1999/08/31 22:47:09  rjmcnab
     15   Added matchmode option for some and all.
     16
    1417   Revision 1.14  1999/07/16 03:42:21  sjboddie
    1518   changed isApprox
     
    6871#include <assert.h>
    6972
    70 #define MAXDOCS 200 // note that maxdocs must be at least as large
    71                     // as the highest possible value of EndResults
     73#define MAXDOCS 50000 // note that maxdocs must be at least as large
     74                      // as the highest possible value of EndResults
    7275
    7376// some useful functions
     
    265268  query.querystring.clear();
    266269  query.search_type = (filterOptions["QueryType"].defaultValue == "ranked");
     270  query.match_mode = (filterOptions["MatchMode"].defaultValue == "all");
    267271  query.casefolding = (filterOptions["Casefold"].defaultValue == "true");
    268272  query.stemming = (filterOptions["Stem"].defaultValue == "true");
     
    290294      query.querystring.clear();
    291295      query.search_type = (filterOptions["QueryType"].defaultValue == "ranked");
     296      query.match_mode = (filterOptions["MatchMode"].defaultValue == "all");
    292297      query.casefolding = (filterOptions["Casefold"].defaultValue == "true");
    293298      query.stemming = (filterOptions["Stem"].defaultValue == "true");
     
    303308    } else if ((*options_here).name == "QueryType") {
    304309      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;
    305313    } else if ((*options_here).name == "Term") {
    306314      query.querystring = (*options_here).value;
     
    468476  filterOptions["QueryType"] = filtopt;
    469477
     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
    470488  // -- onePerTerm  Term           string ???
    471489  filtopt.clear();
     
    614632  // open the database
    615633  gdbmptr->setlogout(&logout);
    616   if (!gdbmptr->opendatabase (gdbm_filename)) {
     634  if (!gdbmptr->opendatabase (gdbm_filename, GDBM_READER, 100, false)) {
    617635    // most likely a system problem (we have already checked that the
    618636    // gdbm database exists)
Note: See TracChangeset for help on using the changeset viewer.