Changeset 879

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

fixed phrase searching bug.

Location:
trunk/gsdl/src/mgpp/text
Files:
2 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; 
  • trunk/gsdl/src/mgpp/text/Queryer.cpp

    r861 r879  
    7474  // do querying 
    7575  QueryInfo queryInfo; 
    76   SetCStr (queryInfo.docLevel, "Document"); 
     76  SetCStr (queryInfo.docLevel, "Chapter"); 
    7777  queryInfo.maxDocs = 10; 
    7878  queryInfo.sortByRank = true;