Switch to unified view

a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.95 2006-11-15 14:57:53 dockes Exp $ (C) 2004 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.96 2006-11-17 10:06:33 dockes Exp $ (C) 2004 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
...
...
1250
    return false;
1250
    return false;
1251
    }
1251
    }
1252
    m_reason.erase();
1252
    m_reason.erase();
1253
    LOGDEB(("Db::setQuery:\n"));
1253
    LOGDEB(("Db::setQuery:\n"));
1254
1254
1255
    m_filterTopDir = sdata->m_topdir;
1255
    m_filterTopDir = sdata->getTopdir();
1256
    m_dbindices.clear();
1256
    m_dbindices.clear();
1257
    m_qOpts = opts;
1257
    m_qOpts = opts;
1258
    m_ndb->m_termfreqs.clear();
1258
    m_ndb->m_termfreqs.clear();
1259
1259
1260
    Xapian::Query xq;
1260
    Xapian::Query xq;
...
...
1268
    delete m_ndb->enquire;
1268
    delete m_ndb->enquire;
1269
    m_ndb->enquire = new Xapian::Enquire(m_ndb->db);
1269
    m_ndb->enquire = new Xapian::Enquire(m_ndb->db);
1270
    m_ndb->enquire->set_query(m_ndb->query);
1270
    m_ndb->enquire->set_query(m_ndb->query);
1271
    m_ndb->mset = Xapian::MSet();
1271
    m_ndb->mset = Xapian::MSet();
1272
    // Get the query description and trim the "Xapian::Query"
1272
    // Get the query description and trim the "Xapian::Query"
1273
    sdata->m_description = m_ndb->query.get_description();
1273
    string d = m_ndb->query.get_description();
1274
    if (sdata->m_description.find("Xapian::Query") == 0)
1274
    if (d.find("Xapian::Query") == 0)
1275
  sdata->m_description = 
1275
  d.erase(0, strlen("Xapian::Query"));
1276
      sdata->m_description.substr(strlen("Xapian::Query"));
1276
    sdata->setDescription(d);
1277
    LOGDEB(("Db::SetQuery: Q: %s\n", sdata->m_description.c_str()));
1277
    LOGDEB(("Db::SetQuery: Q: %s\n", sdata->getDescription().c_str()));
1278
    return true;
1278
    return true;
1279
}
1279
}
1280
1280
1281
// Characters that can begin a wildcard or regexp expression. We use skipto
1281
// Characters that can begin a wildcard or regexp expression. We use skipto
1282
// to begin the allterms search with terms that begin with the portion of
1282
// to begin the allterms search with terms that begin with the portion of