Changeset 500 for trunk/gsdl/src


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

fixed small problem

File:
1 edited

Legend:

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

    r395 r500  
    1212/*
    1313   $Log$
     14   Revision 1.5  1999/08/31 22:45:12  rjmcnab
     15   fixed small problem
     16
    1417   Revision 1.4  1999/07/16 00:15:48  sjboddie
    1518   changed to use termfreqclassarray type
     
    4043  while (here <= end) {
    4144    c_len = parse_utf8_char (here, end, &c);
     45    if (c == '(') {
     46      // found a note, look for '}'
     47      while (here <= end && c != ')') {
     48    c_len = parse_utf8_char (here, end, &c);
     49    here += c_len;
     50      }
     51    }
     52    if (c == '{') {
     53      // found a composite character, look for '}'
     54      while (here <= end && c != '}') {
     55    c_len = parse_utf8_char (here, end, &c);
     56    here += c_len;
     57      }
     58    }
    4259    if (is_unicode_letdig(c)) {
    4360      while (c_len > 0) {
     61    // this is in a word
    4462    word.push_back(*here);
    4563    here++; c_len--;
     
    159177  if (!gdbm.getinfo (OID, OID_info)) return false;
    160178
    161   metadata = (to_utf8(OID_info[gran])).getcarr(metadata_len);
    162   bool result = doc_phrase_search ((unsigned char *)metadata, metadata_len, phrase);
    163   delete [] metadata;
    164  
     179  bool result = false;
     180  text_tarray *tarr_ptr = OID_info.getmultinfo (gran);
     181  if (tarr_ptr != NULL ) {
     182    text_tarray::const_iterator subvalue_here = (*tarr_ptr).begin();
     183    text_tarray::const_iterator subvalue_end = (*tarr_ptr).end();
     184    while (subvalue_here != subvalue_end) {
     185      if (subvalue_here != NULL) {
     186    metadata = (to_utf8(*subvalue_here)).getcarr(metadata_len);
     187    result = doc_phrase_search ((unsigned char *)metadata, metadata_len, phrase);
     188    delete [] metadata;
     189
     190    if (result) return true;
     191      }
     192     
     193      subvalue_here++;
     194    }
     195  }
     196
    165197  return result;
    166198}
Note: See TracChangeset for help on using the changeset viewer.