Ignore:
Timestamp:
2006-08-02T16:30:23+12:00 (18 years ago)
Author:
mdewsnip
Message:

Now shows the stopwords removed by Lucene, many thanks to Me and DL Consulting Ltd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/queryaction.cpp

    r12276 r12380  
    12251225      ++this_term;
    12261226    }
    1227    
     1227
    12281228    if (response.numDocs > 0) {
    12291229      numdocs += response.numDocs;
     
    15781578// define_single_query_macros sets the extra macros for search_single_coll
    15791579// that couldn't be set until the query had been done. Those macros are
    1580 // _freqmsg_,
     1580// _freqmsg_ and _stopwordsmsg_
    15811581void queryaction::define_single_query_macros (cgiargsclass &args,
    15821582                          displayclass &disp,
    15831583                          const FilterResponse_t &response) {
    1584   // set up _freqmsg_ macros
     1584  // set up _freqmsg_ and _stopwordsmsg_ macros
    15851585
    15861586  text_t freqmsg = "";
     
    15941594    ++this_term;
    15951595  }
    1596  
    15971596  disp.setmacro ("freqmsg", "query", freqmsg);
     1597
     1598  text_t stopwordsmsg = "_textstopwordsmsg_ ";
     1599  text_tset::const_iterator stopwords_iterator = response.stopwords.begin();
     1600  while (stopwords_iterator != response.stopwords.end()) {
     1601    if (stopwordsmsg != "_textstopwordsmsg_ ") {
     1602      stopwordsmsg += ", ";
     1603    }
     1604    stopwordsmsg += (*stopwords_iterator);
     1605    ++stopwords_iterator;
     1606  }
     1607  disp.setmacro("stopwordsmsg", "query", stopwordsmsg);
    15981608}
    15991609
Note: See TracChangeset for help on using the changeset viewer.