Changeset 12389


Ignore:
Timestamp:
2006-08-03T10:59:45+12:00 (18 years ago)
Author:
mdewsnip
Message:

The "the following words were too common and were ignored" message (for Lucene stopwords) was being displayed always, rather than just when it was appropriate.

Location:
trunk/gsdl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/query.dm

    r12382 r12389  
    543543_freqmsg_
    544544_textpostprocess_
    545 (_stopwordsmsg_)</small><br />
     545_If_(_stopwordsmsg_,(_stopwordsmsg_))</small><br />
    546546_resultline_
    547547,<div class="divbar">&nbsp;</div>)
  • trunk/gsdl/src/recpt/queryaction.cpp

    r12388 r12389  
    16061606  disp.setmacro ("freqmsg", "query", freqmsg);
    16071607
    1608   text_t stopwordsmsg = "_textstopwordsmsg_ ";
    1609   text_tset::const_iterator stopwords_iterator = response.stopwords.begin();
    1610   while (stopwords_iterator != response.stopwords.end()) {
    1611     if (stopwordsmsg != "_textstopwordsmsg_ ") {
    1612       stopwordsmsg += ", ";
    1613     }
    1614     stopwordsmsg += (*stopwords_iterator);
    1615     ++stopwords_iterator;
    1616   }
    1617   disp.setmacro("stopwordsmsg", "query", stopwordsmsg);
     1608  text_tset::const_iterator this_stopword = response.stopwords.begin();
     1609  text_tset::const_iterator end_stopword = response.stopwords.end();
     1610  if (this_stopword != end_stopword) {
     1611    text_t stopwordsmsg = "_textstopwordsmsg_ ";
     1612    while (this_stopword != end_stopword) {
     1613      if (stopwordsmsg != "_textstopwordsmsg_ ") {
     1614    stopwordsmsg += ", ";
     1615      }
     1616      stopwordsmsg += (*this_stopword);
     1617      ++this_stopword;
     1618    }
     1619    disp.setmacro("stopwordsmsg", "query", stopwordsmsg);
     1620  }
    16181621}
    16191622
Note: See TracChangeset for help on using the changeset viewer.