Changeset 265


Ignore:
Timestamp:
1999-06-09T12:41:32+12:00 (25 years ago)
Author:
sjboddie
Message:

phrase searching now uses case-folding if it's turned on

File:
1 edited

Legend:

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

    r163 r265  
    1212/*
    1313   $Log$
     14   Revision 1.6  1999/06/09 00:41:32  sjboddie
     15   phrase searching now uses case-folding if it's turned on
     16
    1417   Revision 1.5  1999/02/21 22:31:35  rjmcnab
    1518
     
    7780
    7881static char *quotedquery = NULL;
     82static int casefold;
    7983
    8084
     
    386390  // quoted part of the query, if there was one
    387391 
    388   if (UDoc != NULL && quotedquery != NULL &&
    389       quotedquery[0] != '\0' && strstr (UDoc, quotedquery) == NULL) return 0;
    390  
     392  //  if (UDoc != NULL && quotedquery != NULL &&
     393  //    quotedquery[0] != '\0' && strstr (UDoc, quotedquery) == NULL) return 0;
     394 
     395 
     396  if (UDoc != NULL && quotedquery != NULL && quotedquery[0] != '\0') {
     397
     398      if (casefold) {
     399          int len;
     400          for (len = 0; quotedquery[len] != '\0'; len ++)
     401              quotedquery[len] = tolower (quotedquery[len]);
     402          for (len = 0; UDoc[len] != '\0'; len ++)
     403              UDoc[len] = tolower (UDoc[len]);
     404      }
     405      if (strstr (UDoc, quotedquery) == NULL) return 0;
     406  }
     407
    391408  // append this entry to the document results
    392409  docresultclass docresult;
     
    513530  if (queryhere == queryend) return true;
    514531
     532  casefold = queryparams.casefolding;
    515533
    516534  // get the names of the collection, index and text suffixes
Note: See TracChangeset for help on using the changeset viewer.