Show
Ignore:
Timestamp:
31.01.2000 16:01:25 (20 years ago)
Author:
rjmcnab
Message:

fixed phrase searching bug.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/mgpp/text/MGQuery.cpp

    r861 r879  
    485485  FragRangeArray fragLimits; 
    486486  FragRangeArray *fragLimitsPtr = NULL; 
    487   if (tagNodePtr != NULL) { 
     487  if (tagNodePtr == NULL && terms.size() > 1) { 
     488    // multiple terms must be compared relative to some tag 
     489    // otherwise phrase matches could span documents 
     490    TagNode tempTagNode; 
     491    tempTagNode.tagName = indexData.curLevel; 
     492    tempTagNode.Calculate (indexData, fragLimits); 
     493    fragLimitsPtr = &fragLimits; 
     494     
     495  } else if (tagNodePtr != NULL) { 
    488496    (*tagNodePtr).Calculate (indexData, fragLimits); 
    489497    fragLimitsPtr = &fragLimits;