Changeset 12314


Ignore:
Timestamp:
2006-07-28T11:40:29+12:00 (18 years ago)
Author:
kjdon
Message:

maxnumeric moved from mgqueryfilterclass to queryfilterclass, cos now mgpp uses it too. Its passed in as an arg to ParseQuery

Location:
trunk/gsdl/src/colservr
Files:
5 edited

Legend:

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

    r9937 r12314  
    148148  // create the mgpp query tree
    149149  QueryNode *queryTree = NULL;
    150   queryTree = ParseQuery(queryArray, defaultBoolCombine, defaultStemMethod);
     150  queryTree = ParseQuery(queryArray, defaultBoolCombine, defaultStemMethod, queryparams.maxnumeric);
    151151  if (queryTree == NULL) { // syntax error
    152152    queryresult.syntax_error = true;
  • trunk/gsdl/src/colservr/mgqueryfilter.cpp

    r11002 r12314  
    9090  queryfilterclass::configure (key, cfgline);
    9191
    92   if (key == "maxnumeric") {
    93     maxnumeric = cfgline[0].getint();
    94   }
    95   else if (key == "indexstem") {
     92  if (key == "indexstem") {
    9693    ((mgsearchclass *)textsearchptr)->set_indexstem (cfgline[0]);
    9794  }
     
    288285
    289286  num_phrases = 0;
    290   maxnumeric = 4;
    291287}
    292288
     
    464460  while (query_here != query_end) {
    465461
    466     // set maxnumeric
    467     (*query_here).maxnumeric = maxnumeric;
    468 
    469462    // if we're doing a phrase search we want to maximise hits by making it
    470463    // a boolean search on the index with the finest granularity - we'll
  • trunk/gsdl/src/colservr/mgqueryfilter.h

    r4193 r12314  
    5151  int num_phrases;
    5252
    53   int maxnumeric;
    54 
    5553  void get_phrase_terms (const text_t &querystring,
    5654             const termfreqclassarray &orgterms,
  • trunk/gsdl/src/colservr/queryfilter.cpp

    r12276 r12314  
    9191  query.level = filterOptions["Level"].defaultValue;
    9292  query.sortfield = filterOptions["SortField"].defaultValue;
     93  query.maxnumeric = maxnumeric;
    9394  OptionValue_tarray::const_iterator options_here = request.filterOptions.begin();
    9495  OptionValue_tarray::const_iterator options_end = request.filterOptions.end();
     
    117118      query.level = filterOptions["Level"].defaultValue;
    118119      query.sortfield = filterOptions["SortField"].defaultValue;
     120      query.maxnumeric = maxnumeric;
    119121      // "all", needed when combining queries where the document results are needed
    120122      if (need_matching_docs (request.filterResultOptions)) query.maxdocs = -1;
     
    170172  gdbmptr = NULL;
    171173  textsearchptr = NULL;
     174  maxnumeric = 4;
    172175
    173176  FilterOption_t filtopt;
     
    337340  } else if (key == "indexstem") {
    338341    indexstem = cfgline[0];
    339   }
     342  } else if (key == "maxnumeric") {
     343    maxnumeric = cfgline[0].getint();
     344  }
     345 
    340346}
    341347
  • trunk/gsdl/src/colservr/queryfilter.h

    r10954 r12314  
    5353 
    5454  searchclass *textsearchptr;
    55  
     55
     56  int maxnumeric;
     57
    5658   // get the query parameters
    5759  void parse_query_params (const FilterRequest_t &request,
Note: See TracChangeset for help on using the changeset viewer.