Search term did not get passed to viewer for the main page open link because of mysteriously lost line of code

This commit is contained in:
Jean-Francois Dockes 2016-12-11 18:53:29 +01:00
parent 525fff9120
commit 13f489306d

View File

@ -255,6 +255,7 @@ double Query::Native::qualityTerms(Xapian::docid docid,
// Return page number for first match of "significant" term.
int Query::Native::getFirstMatchPage(Xapian::docid docid, string& term)
{
LOGDEB("Query::Native::getFirstMatchPage\n");
if (!m_q|| !m_q->m_db || !m_q->m_db->m_ndb || !m_q->m_db->m_ndb->m_isopen) {
LOGERR("Query::getFirstMatchPage: no db\n" );
return -1;
@ -279,6 +280,7 @@ int Query::Native::getFirstMatchPage(Xapian::docid docid, string& term)
// We try to use a page which matches the "best" term. Get a sorted list
multimap<double, vector<string> > byQ;
qualityTerms(docid, terms, byQ);
for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
mit != byQ.rend(); mit++) {