Switch to unified view

a/src/index/fsindexer.cpp b/src/index/fsindexer.cpp
...
...
212
212
213
    for (list<string>::iterator it = files.begin(); it != files.end(); ) {
213
    for (list<string>::iterator it = files.begin(); it != files.end(); ) {
214
        LOGDEB2(("FsIndexer::indexFiles: [%s]\n", it->c_str()));
214
        LOGDEB2(("FsIndexer::indexFiles: [%s]\n", it->c_str()));
215
215
216
        m_config->setKeyDir(path_getfather(*it));
216
        m_config->setKeyDir(path_getfather(*it));
217
        if (m_havelocalfields)
218
            localfieldsfromconf();
217
        walker.setSkippedNames(m_config->getSkippedNames());
219
        walker.setSkippedNames(m_config->getSkippedNames());
218
220
219
    // Check path against indexed areas and skipped names/paths
221
    // Check path against indexed areas and skipped names/paths
220
        if (matchesSkipped(m_tdl, walker, *it)) {
222
        if (matchesSkipped(m_tdl, walker, *it)) {
221
            it++; continue;
223
            it++; continue;
...
...
283
    LOGDEB(("FsIndexer::localfieldsfromconf\n"));
285
    LOGDEB(("FsIndexer::localfieldsfromconf\n"));
284
    m_localfields.clear();
286
    m_localfields.clear();
285
    string sfields;
287
    string sfields;
286
    if (!m_config->getConfParam("localfields", sfields))
288
    if (!m_config->getConfParam("localfields", sfields))
287
        return;
289
        return;
288
    list<string> lfields;
290
    // Substitute ':' with '\n' inside the string. There is no way to escape ':'
289
    if (!stringToStrings(sfields, lfields)) {
291
    for (string::size_type i = 0; i < sfields.size(); i++)
290
        LOGERR(("FsIndexer::localfieldsfromconf: bad syntax for [%s]\n", 
292
        if (sfields[i] == ':')
291
                sfields.c_str()));
293
            sfields[i] = '\n';
292
        return;
294
    // Parse the result with a confsimple and add the results to the metadata
293
    }
294
    for (list<string>::const_iterator it = lfields.begin();
295
         it != lfields.end(); it++) {
296
        ConfSimple conf(*it, 1, true);
295
    ConfSimple conf(sfields, 1, true);
297
        list<string> nmlst = conf.getNames("");
296
    list<string> nmlst = conf.getNames("");
298
        for (list<string>::const_iterator it1 = nmlst.begin();
297
    for (list<string>::const_iterator it = nmlst.begin();
299
             it1 != nmlst.end(); it1++) {
298
         it != nmlst.end(); it++) {
300
            conf.get(*it1, m_localfields[*it1]);
299
        conf.get(*it, m_localfields[*it]);
301
            LOGDEB2(("FsIndexer::localfieldsfromconf: [%s] => [%s]\n",
300
        LOGDEB(("FsIndexer::localfieldsfromconf: [%s] => [%s]\n",
302
                    (*it1).c_str(), m_localfields[*it1].c_str()));
301
                    (*it).c_str(), m_localfields[*it].c_str()));
303
        }
304
    }
302
    }
305
}
303
}
306
304
307
// 
305
// 
308
void FsIndexer::setlocalfields(Rcl::Doc& doc)
306
void FsIndexer::setlocalfields(Rcl::Doc& doc)