Switch to unified view

a/src/rcldb/searchdata.cpp b/src/rcldb/searchdata.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.5 2006-11-18 12:30:14 dockes Exp $ (C) 2006 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.6 2006-11-30 13:38:44 dockes Exp $ (C) 2006 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
180
/** Make term dumb and possibly expand it into its stem siblings. */
180
/** Make term dumb and possibly expand it into its stem siblings. */
181
void StringToXapianQ::maybeStemExp(bool nostemexp, 
181
void StringToXapianQ::maybeStemExp(bool nostemexp, 
182
                   const string& term, 
182
                   const string& term, 
183
                   list<string>& exp)
183
                   list<string>& exp)
184
{
184
{
185
    LOGDEB2(("maybeStemExp: [%s]\n", term.c_str()));
185
    LOGDEB2(("maybeStemExp: term [%s] stemlang [%s] nostemexp %d\n", 
186
      term.c_str(), m_stemlang.c_str(), nostemexp));
186
    if (term.empty()) {
187
    if (term.empty()) {
187
    exp.clear();
188
    exp.clear();
188
    return;
189
    return;
189
    }
190
    }
190
191
191
    string term1;
192
    string term1;
192
    dumb_string(term, term1);
193
    dumb_string(term, term1);
193
194
194
    if (!m_stemlang.empty() && !nostemexp) {
195
    if (m_stemlang.empty())
196
  nostemexp = true;
197
198
    if (!nostemexp) {
195
    // Check if the first letter is a majuscule in which
199
    // Check if the first letter is a majuscule in which
196
    // case we do not want to do stem expansion. Note that
200
    // case we do not want to do stem expansion. Note that
197
    // the test is convoluted and possibly problematic
201
    // the test is convoluted and possibly problematic
198
202
199
    string noacterm,noaclowterm;
203
    string noacterm,noaclowterm;
...
...
265
                string &ermsg,
269
                string &ermsg,
266
                list<Xapian::Query> &pqueries,
270
                list<Xapian::Query> &pqueries,
267
                int slack, bool useNear)
271
                int slack, bool useNear)
268
{
272
{
269
    string qstring = iq;
273
    string qstring = iq;
274
    LOGDEB2(("StringToXapianQ:: query string: [%s]\n", iq.c_str()));
270
    ermsg.erase();
275
    ermsg.erase();
271
    m_terms.clear();
276
    m_terms.clear();
272
    m_groups.clear();
277
    m_groups.clear();
273
278
274
    // Split into words and phrases (word1 word2 "this is a phrase"):
279
    // Split into words and phrases (word1 word2 "this is a phrase"):