|
a/src/common/rclconfig.cpp |
|
b/src/common/rclconfig.cpp |
|
... |
|
... |
609 |
{
|
609 |
{
|
610 |
LOGDEB2(("RclConfig::inStopSuffixes(%s)\n", fni.c_str()));
|
610 |
LOGDEB2(("RclConfig::inStopSuffixes(%s)\n", fni.c_str()));
|
611 |
// Beware: both needrecompute() need to be called always hence the
|
611 |
// Beware: both needrecompute() need to be called always hence the
|
612 |
// bizarre way we do things
|
612 |
// bizarre way we do things
|
613 |
bool needrecompute = m_stpsuffstate.needrecompute();
|
613 |
bool needrecompute = m_stpsuffstate.needrecompute();
|
614 |
needrecompute = needrecompute || m_oldstpsuffstate.needrecompute();
|
614 |
needrecompute = m_oldstpsuffstate.needrecompute() || needrecompute;
|
615 |
if (needrecompute || m_stopsuffixes == 0) {
|
615 |
if (needrecompute || m_stopsuffixes == 0) {
|
616 |
// Need to initialize the suffixes
|
616 |
// Need to initialize the suffixes
|
617 |
delete STOPSUFFIXES;
|
617 |
delete STOPSUFFIXES;
|
618 |
if ((m_stopsuffixes = new SuffixStore) == 0) {
|
618 |
if ((m_stopsuffixes = new SuffixStore) == 0) {
|
619 |
LOGERR(("RclConfig::inStopSuffixes: out of memory\n"));
|
619 |
LOGERR(("RclConfig::inStopSuffixes: out of memory\n"));
|
620 |
return false;
|
620 |
return false;
|
621 |
}
|
621 |
}
|
|
|
622 |
// Let the old customisation have priority: if recoll_noindex
|
|
|
623 |
// from mimemap is set, it the user's (the default value is
|
|
|
624 |
// gone). Else use the new variable
|
622 |
vector<string> stoplist;
|
625 |
vector<string> stoplist;
|
|
|
626 |
if (!m_oldstpsuffstate.savedvalue.empty()) {
|
|
|
627 |
stringToStrings(m_oldstpsuffstate.savedvalue, stoplist);
|
|
|
628 |
} else {
|
623 |
stringToStrings(m_stpsuffstate.savedvalue, stoplist);
|
629 |
stringToStrings(m_stpsuffstate.savedvalue, stoplist);
|
624 |
vector<string> ostoplist;
|
630 |
}
|
625 |
stringToStrings(m_oldstpsuffstate.savedvalue, ostoplist);
|
|
|
626 |
stoplist.resize(stoplist.size() + ostoplist.size());
|
|
|
627 |
stoplist.insert(stoplist.end(), ostoplist.begin(), ostoplist.end());
|
|
|
628 |
for (vector<string>::const_iterator it = stoplist.begin();
|
631 |
for (vector<string>::const_iterator it = stoplist.begin();
|
629 |
it != stoplist.end(); it++) {
|
632 |
it != stoplist.end(); it++) {
|
630 |
STOPSUFFIXES->insert(SfString(stringtolower(*it)));
|
633 |
STOPSUFFIXES->insert(SfString(stringtolower(*it)));
|
631 |
if (m_maxsufflen < it->length())
|
634 |
if (m_maxsufflen < it->length())
|
632 |
m_maxsufflen = it->length();
|
635 |
m_maxsufflen = it->length();
|