Switch to unified view

a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp
...
...
765
765
766
    fldToPrefs[Doc::keykw] = "K";
766
    fldToPrefs[Doc::keykw] = "K";
767
    fldToPrefs["keyword"] = "K";
767
    fldToPrefs["keyword"] = "K";
768
    fldToPrefs["tag"] = "K";
768
    fldToPrefs["tag"] = "K";
769
    fldToPrefs["tags"] = "K";
769
    fldToPrefs["tags"] = "K";
770
771
        fldToPrefs["xapyear"] = "Y";
772
        fldToPrefs["xapyearmon"] = "M";
773
        fldToPrefs["xapdate"] = "D";
770
    }
774
    }
771
775
772
    if (m_config && m_config->getFieldPrefix(fld, pfx))
776
    if (m_config && m_config->getFieldPrefix(fld, pfx))
773
    return true;
777
    return true;
774
778
...
...
1362
    // control the prefixes!
1366
    // control the prefixes!
1363
    names.push_back("XNONENoMatchingTerms");
1367
    names.push_back("XNONENoMatchingTerms");
1364
    }
1368
    }
1365
    return true;
1369
    return true;
1366
}
1370
}
1371
1372
// Walk the Y terms and return min/max
1373
bool Db::maxYearSpan(int *minyear, int *maxyear)
1374
{
1375
    *minyear = 1000000; 
1376
    *maxyear = -1000000;
1377
    TermMatchResult result;
1378
    if (!termMatch(ET_WILD, string(), "*", result, 5000, "xapyear"))
1379
  return false;
1380
    for (list<TermMatchEntry>::const_iterator it = result.entries.begin();
1381
   it != result.entries.end(); it++) {
1382
        if (!it->term.empty()) {
1383
            int year = atoi(it->term.c_str()+1);
1384
            if (year < *minyear)
1385
                *minyear = year;
1386
            if (year > *maxyear)
1387
                *maxyear = year;
1388
        }
1389
    }
1390
    return true;
1391
}
1392
1367
1393
1368
class TermMatchCmpByWcf {
1394
class TermMatchCmpByWcf {
1369
public:
1395
public:
1370
    int operator()(const TermMatchEntry& l, const TermMatchEntry& r) {
1396
    int operator()(const TermMatchEntry& l, const TermMatchEntry& r) {
1371
    return r.wcf - l.wcf < 0;
1397
    return r.wcf - l.wcf < 0;