Changeset 500 for trunk/gsdl/src
- Timestamp:
- 1999-09-01T10:45:12+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/phrasesearch.cpp
r395 r500 12 12 /* 13 13 $Log$ 14 Revision 1.5 1999/08/31 22:45:12 rjmcnab 15 fixed small problem 16 14 17 Revision 1.4 1999/07/16 00:15:48 sjboddie 15 18 changed to use termfreqclassarray type … … 40 43 while (here <= end) { 41 44 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 } 42 59 if (is_unicode_letdig(c)) { 43 60 while (c_len > 0) { 61 // this is in a word 44 62 word.push_back(*here); 45 63 here++; c_len--; … … 159 177 if (!gdbm.getinfo (OID, OID_info)) return false; 160 178 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 165 197 return result; 166 198 }
Note:
See TracChangeset
for help on using the changeset viewer.