Switch to unified view

a/src/query/filtseq.cpp b/src/query/filtseq.cpp
...
...
38
    }
38
    }
39
    // Did all comparisons
39
    // Did all comparisons
40
    return 0;
40
    return 0;
41
} 
41
} 
42
42
43
DocSeqFiltered::DocSeqFiltered(RefCntr<DocSequence> iseq, 
44
                 DocSeqFiltSpec &filtspec,
45
                 const std::string &t)
46
    :  DocSeqModifier(t, iseq), m_spec(filtspec)
47
{
48
}
49
50
bool DocSeqFiltered::setFiltSpec(DocSeqFiltSpec &filtspec)
43
bool DocSeqFiltered::setFiltSpec(DocSeqFiltSpec &filtspec)
51
{
44
{
52
    m_spec = filtspec;
45
    m_spec = filtspec;
53
    m_dbindices.clear();
46
    m_dbindices.clear();
54
    return true;
47
    return true;
...
...
57
bool DocSeqFiltered::getDoc(int idx, Rcl::Doc &doc, string *)
50
bool DocSeqFiltered::getDoc(int idx, Rcl::Doc &doc, string *)
58
{
51
{
59
    LOGDEB1(("DocSeqFiltered: fetching %d\n", idx));
52
    LOGDEB1(("DocSeqFiltered: fetching %d\n", idx));
60
53
61
    if (idx >= (int)m_dbindices.size()) {
54
    if (idx >= (int)m_dbindices.size()) {
62
    // Have to fetch xapian docs and filter until we get enough or
55
    // Have to fetch docs and filter until we get enough or
63
    // fail
56
    // fail
64
    m_dbindices.reserve(idx+1);
57
    m_dbindices.reserve(idx+1);
65
58
66
    // First backend seq doc we fetch is the one after last stored 
59
    // First backend seq doc we fetch is the one after last stored 
67
    int backend_idx = m_dbindices.size() > 0 ? m_dbindices.back() + 1 : 0;
60
    int backend_idx = m_dbindices.size() > 0 ? m_dbindices.back() + 1 : 0;