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

Added MatchMode.

File:
1 edited

Legend:

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

    r398 r502  
    1212/*
    1313   $Log$
     14   Revision 1.11  1999/08/31 22:47:57  rjmcnab
     15   Added MatchMode.
     16
    1417   Revision 1.10  1999/07/16 03:42:23  sjboddie
    1518   changed isApprox
     
    6871  querystring.clear();
    6972  search_type = 0; // 0 = boolean, 1 = ranked
     73  match_mode = 0; // 0 = some, 1 = all
    7074  casefolding = 0;
    7175  stemming = 0;
     
    8286  querystring = q.querystring;
    8387  search_type = q.search_type;
     88  match_mode = q.match_mode;
    8489  casefolding = q.casefolding;
    8590  stemming = q.stemming;
     
    98103      (x.querystring == y.querystring) &&
    99104      (x.search_type == y.search_type) &&
     105      (x.match_mode == y.match_mode) &&
    100106      (x.casefolding == y.casefolding) &&
    101107      (x.stemming == y.stemming) &&
     
    119125  outs << text_t2ascii << " querystring = \"" << q.querystring << "\"\n";
    120126  outs << " search_type = \"" << q.search_type << "\"\n";
     127  outs << " match_mode = \"" << q.match_mode << "\"\n";
    121128  outs << " casefolding = \"" << q.casefolding << "\"\n";
    122129  outs << " stemming = \"" << q.stemming << "\"\n";
     
    217224
    218225  return *this;
     226}
     227
     228
     229bool operator==(const docresultclass &x, const docresultclass &y) {
     230  return ((x.docnum == y.docnum) && (x.docweight == y.docweight) &&
     231      (x.num_query_terms_matched == y.num_query_terms_matched) &&
     232      (x.num_phrase_match == y.num_phrase_match));
     233}
     234
     235bool operator<(const docresultclass &x, const docresultclass &y) {
     236  return ((x.docnum < y.docnum) ||
     237      ((x.docnum == y.docnum) &&
     238       ((x.docweight < y.docweight) ||
     239        ((x.docweight == y.docweight) &&
     240         ((x.num_query_terms_matched < y.num_query_terms_matched) ||
     241          ((x.num_query_terms_matched == y.num_query_terms_matched) &&
     242           ((x.num_phrase_match < y.num_phrase_match))))))));
    219243}
    220244
Note: See TracChangeset for help on using the changeset viewer.