Ignore:
Timestamp:
2004-11-29T15:43:11+13:00 (19 years ago)
Author:
kjdon
Message:

Added the changes from Emanuel Dejanu (Simple Words) - mostly efficiency changes. For example, changing i++ to ++i, delete xxx to delete []xxx, some stuff to do with UCArrays...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/indexers/mgpp/text/GSDLQueryParser.cpp

    r8242 r8692  
    9494                UCArray &nearby,
    9595                bool reverse) {
    96   UCArray NEARBY; SetCStr(NEARBY, "NEAR");
    97   UCArray WITHIN; SetCStr(WITHIN, "WITHIN");
     96  UCArray NEARBY; SetCStr(NEARBY, "NEAR", 4);
     97  UCArray WITHIN; SetCStr(WITHIN, "WITHIN", 6);
    9898 
    9999  if (nearby == NEARBY) { // no modifier
     
    123123    while (here != end) {
    124124      size = size*10 + (*here-'0');
    125       here++;
     125      ++here;
    126126    }
    127127    if (within) {
     
    263263  UCArray near_string;
    264264  while (ParseLexEl (here, end, el)) {
    265     if (el.lexType == TermE || el.lexType == IntegerE) {
     265    // cant have AND, OR, NOT in square brackets, so assume they are words
     266    if (el.lexType == TermE || el.lexType == IntegerE || el.lexType == AndOpE || el.lexType == OrOpE || el.lexType == NotOpE) {
    266267      TermNode termNode;
    267268      termNode.term = el.text;
Note: See TracChangeset for help on using the changeset viewer.