Switch to unified view

a/src/rcldb/rclabstract.cpp b/src/rcldb/rclabstract.cpp
...
...
253
}
253
}
254
254
255
// Return page number for first match of "significant" term.
255
// Return page number for first match of "significant" term.
256
int Query::Native::getFirstMatchPage(Xapian::docid docid, string& term)
256
int Query::Native::getFirstMatchPage(Xapian::docid docid, string& term)
257
{
257
{
258
    LOGDEB("Query::Native::getFirstMatchPage\n");
258
    if (!m_q|| !m_q->m_db || !m_q->m_db->m_ndb || !m_q->m_db->m_ndb->m_isopen) {
259
    if (!m_q|| !m_q->m_db || !m_q->m_db->m_ndb || !m_q->m_db->m_ndb->m_isopen) {
259
    LOGERR("Query::getFirstMatchPage: no db\n" );
260
    LOGERR("Query::getFirstMatchPage: no db\n" );
260
    return -1;
261
    return -1;
261
    }
262
    }
262
    Rcl::Db::Native *ndb(m_q->m_db->m_ndb);
263
    Rcl::Db::Native *ndb(m_q->m_db->m_ndb);
...
...
277
    
278
    
278
    setDbWideQTermsFreqs();
279
    setDbWideQTermsFreqs();
279
280
280
    // We try to use a page which matches the "best" term. Get a sorted list
281
    // We try to use a page which matches the "best" term. Get a sorted list
281
    multimap<double, vector<string> > byQ;
282
    multimap<double, vector<string> > byQ;
283
    qualityTerms(docid, terms, byQ);
282
284
283
    for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin(); 
285
    for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin(); 
284
     mit != byQ.rend(); mit++) {
286
     mit != byQ.rend(); mit++) {
285
    for (vector<string>::const_iterator qit = mit->second.begin();
287
    for (vector<string>::const_iterator qit = mit->second.begin();
286
         qit != mit->second.end(); qit++) {
288
         qit != mit->second.end(); qit++) {