Switch to unified view

a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp
...
...
1621
bool Db::deleteStemDb(const string& lang)
1621
bool Db::deleteStemDb(const string& lang)
1622
{
1622
{
1623
    LOGDEB(("Db::deleteStemDb(%s)\n", lang.c_str()));
1623
    LOGDEB(("Db::deleteStemDb(%s)\n", lang.c_str()));
1624
    if (m_ndb == 0 || m_ndb->m_isopen == false || !m_ndb->m_iswritable)
1624
    if (m_ndb == 0 || m_ndb->m_isopen == false || !m_ndb->m_iswritable)
1625
    return false;
1625
    return false;
1626
    WritableStemDb db(m_ndb->xwdb);
1626
    XapWritableSynFamily db(m_ndb->xwdb, synFamStem);
1627
    return db.deleteMember(lang);
1627
    return db.deleteMember(lang);
1628
}
1628
}
1629
1629
1630
/**
1630
/**
1631
 * Create database of stem to parents associations for a given language.
1631
 * Create database of stem to parents associations for a given language.
1632
 * We walk the list of all terms, stem them, and create another Xapian db
1632
 * We walk the list of all terms, stem them, and create another Xapian db
1633
 * with documents indexed by a single term (the stem), and with the list of
1633
 * with documents indexed by a single term (the stem), and with the list of
1634
 * parent terms in the document data.
1634
 * parent terms in the document data.
1635
 */
1635
 */
1636
bool Db::createStemDb(const string& lang)
1636
bool Db::createStemDbs(const vector<string>& langs)
1637
{
1637
{
1638
    LOGDEB(("Db::createStemDb(%s)\n", lang.c_str()));
1638
    LOGDEB(("Db::createStemDbs\n"));
1639
    if (m_ndb == 0 || m_ndb->m_isopen == false || !m_ndb->m_iswritable) {
1639
    if (m_ndb == 0 || m_ndb->m_isopen == false || !m_ndb->m_iswritable) {
1640
    LOGERR(("createStemDb: db not open or not writable\n"));
1640
    LOGERR(("createStemDb: db not open or not writable\n"));
1641
    return false;
1641
    return false;
1642
    }
1642
    }
1643
1643
1644
    WritableStemDb db(m_ndb->xwdb);
1644
    return createExpansionDbs(m_ndb->xwdb, langs);
1645
    return db.createDb(lang);
1646
}
1645
}
1647
1646
1648
/**
1647
/**
1649
 * This is called at the end of an indexing session, to delete the
1648
 * This is called at the end of an indexing session, to delete the
1650
 * documents for files that are no longer there. This can ONLY be called
1649
 * documents for files that are no longer there. This can ONLY be called