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.

Location:
trunk/gsdl/src/colservr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/colservr/expat_resultset.cpp

    r12262 r12380  
    5151    termfreqobj.termfreq = atoi(term_frequency_str);
    5252    queryresult_ptr->orgterms.push_back(termfreqobj);
     53  }
     54
     55  if (element_name == "StopWord") {
     56    char* stop_word_value_str = get_attribute(attributes, "value");
     57    queryresult_ptr->stopwords.insert((text_t) stop_word_value_str);
    5358  }
    5459
  • trunk/gsdl/src/colservr/lucenequeryfilter.cpp

    r9620 r12380  
    238238      ++terms_here;
    239239    }
     240
     241    // add the stop words
     242    text_tset::iterator stopwords_here = queryresults.stopwords.begin();
     243    text_tset::iterator stopwords_end = queryresults.stopwords.end();
     244    while (stopwords_here != stopwords_end) {
     245      response.stopwords.insert(*stopwords_here);
     246      ++stopwords_here;
     247    }
    240248  }
    241249
     
    367375    ++termvar_here;
    368376      }
     377
     378      // add the stop words
     379      text_tset::iterator stopwords_here = thisqueryresults.stopwords.begin();
     380      text_tset::iterator stopwords_end = thisqueryresults.stopwords.end();
     381      while (stopwords_here != stopwords_end) {
     382    multiresults.stopwords.insert(*stopwords_here);
     383    ++stopwords_here;
     384      }
    369385    }
    370386   
  • trunk/gsdl/src/colservr/queryinfo.h

    r12276 r12380  
    176176  termfreqclassarray terms;
    177177  text_tset termvariants;
    178  
     178  text_tset stopwords;
     179
    179180  void clear ();
    180181  queryresultsclass &operator=(const queryresultsclass &q);
Note: See TracChangeset for help on using the changeset viewer.