Switch to unified view

a/src/query/docseqdb.cpp b/src/query/docseqdb.cpp
...
...
67
    if (m_rescnt < 0) {
67
    if (m_rescnt < 0) {
68
    m_rescnt= m_q->getResCnt();
68
    m_rescnt= m_q->getResCnt();
69
    }
69
    }
70
    return m_rescnt;
70
    return m_rescnt;
71
}
71
}
72
72
static const string cstr_mre("[...]");
73
static const string cstr_mre("[...]");
73
74
74
// This one only gets called to fill-up the snippets window
75
// This one only gets called to fill-up the snippets window
75
// We ignore most abstract/snippets preferences.
76
// We ignore most abstract/snippets preferences.
76
bool DocSequenceDb::getAbstract(Rcl::Doc &doc, vector<Rcl::Snippet>& vpabs)
77
bool DocSequenceDb::getAbstract(Rcl::Doc &doc, vector<Rcl::Snippet>& vpabs)
...
...
79
    if (!setQuery())
80
    if (!setQuery())
80
    return false;
81
    return false;
81
82
82
    // Have to put the limit somewhere. 
83
    // Have to put the limit somewhere. 
83
    int maxoccs = 1000;
84
    int maxoccs = 1000;
84
    Rcl::abstract_result ret = Rcl::ABSRES_ERROR;
85
    int ret = Rcl::ABSRES_ERROR;
85
    if (m_q->whatDb()) {
86
    if (m_q->whatDb()) {
86
    ret = m_q->makeDocAbstract(doc, vpabs, maxoccs, 
87
    ret = m_q->makeDocAbstract(doc, vpabs, maxoccs, 
87
                   m_q->whatDb()->getAbsCtxLen()+ 2);
88
                   m_q->whatDb()->getAbsCtxLen()+ 2);
88
    } 
89
    } 
90
    LOGDEB(("DocSequenceDb::getAbstract: got ret %d vpabs len %u\n", ret,
91
      vpabs.size()));
89
    if (vpabs.empty())
92
    if (vpabs.empty()) {
90
  vpabs.push_back(Rcl::Snippet(0, doc.meta[Rcl::Doc::keyabs]));
93
  return true;
94
    }
91
95
92
    // If the list was probably truncated, indicate it.
96
    // If the list was probably truncated, indicate it.
93
    if (ret == Rcl::ABSRES_TRUNC) {
97
    if (ret | Rcl::ABSRES_TRUNC) {
94
    vpabs.push_back(Rcl::Snippet(-1, cstr_mre));
98
    vpabs.push_back(Rcl::Snippet(-1, cstr_mre));
99
    } 
95
    } else if (ret == Rcl::ABSRES_TERMMISS) {
100
    if (ret | Rcl::ABSRES_TERMMISS) {
96
    vpabs.insert(vpabs.begin(), 
101
    vpabs.insert(vpabs.begin(), 
97
             Rcl::Snippet(-1, "(Words missing in snippets)"));
102
             Rcl::Snippet(-1, "(Words missing in snippets)"));
98
    }
103
    }
99
104
100
    return true;
105
    return true;