Switch to unified view

a/src/query/docseqdb.cpp b/src/query/docseqdb.cpp
...
...
63
    m_rescnt= m_q->getResCnt();
63
    m_rescnt= m_q->getResCnt();
64
    }
64
    }
65
    return m_rescnt;
65
    return m_rescnt;
66
}
66
}
67
67
68
// This one only gets called to fill-up the snippets window
69
// We ignore most abstract/snippets preferences.
68
bool DocSequenceDb::getAbstract(Rcl::Doc &doc, 
70
bool DocSequenceDb::getAbstract(Rcl::Doc &doc, 
69
                vector<pair<int, string> >& vpabs)
71
                vector<pair<int, string> >& vpabs)
70
{
72
{
71
    LOGDEB(("DocSequenceDb::getAbstract/pair\n"));
73
    LOGDEB(("DocSequenceDb::getAbstract/pair\n"));
72
    setQuery();
74
    setQuery();
75
76
    // Have to put the limit somewhere. 
77
    int maxoccs = 500;
78
    Rcl::abstract_result ret = Rcl::ABSRES_ERROR;
73
    if (m_q->whatDb() &&
79
    if (m_q->whatDb()) {
74
  m_queryBuildAbstract && (doc.syntabs || m_queryReplaceAbstract)) {
75
    m_q->whatDb()->makeDocAbstract(doc, m_q.getptr(), vpabs);
80
    ret = m_q->whatDb()->makeDocAbstract(doc, m_q.getptr(), vpabs, 
81
                       maxoccs, 
82
                       m_q->whatDb()->getAbsCtxLen()+ 2);
76
    } 
83
    } 
77
    if (vpabs.empty())
84
    if (vpabs.empty())
78
    vpabs.push_back(pair<int, string>(0, doc.meta[Rcl::Doc::keyabs]));
85
    vpabs.push_back(pair<int, string>(0, doc.meta[Rcl::Doc::keyabs]));
86
87
    // If the list was probably truncated, indicate it.
88
    if (ret == Rcl::ABSRES_TRUNC)
89
  vpabs.push_back(pair<int, string>(-1, "[...]"));
90
79
    return true;
91
    return true;
80
}
92
}
93
81
bool DocSequenceDb::getAbstract(Rcl::Doc &doc, vector<string>& vabs)
94
bool DocSequenceDb::getAbstract(Rcl::Doc &doc, vector<string>& vabs)
82
{
95
{
83
    setQuery();
96
    setQuery();
84
    if (m_q->whatDb() &&
97
    if (m_q->whatDb() &&
85
    m_queryBuildAbstract && (doc.syntabs || m_queryReplaceAbstract)) {
98
    m_queryBuildAbstract && (doc.syntabs || m_queryReplaceAbstract)) {