diff --git a/src/rcldb/rclabstract.cpp b/src/rcldb/rclabstract.cpp index c60743c8..2167f62b 100644 --- a/src/rcldb/rclabstract.cpp +++ b/src/rcldb/rclabstract.cpp @@ -290,8 +290,8 @@ abstract_result Query::Native::makeAbstract(Xapian::docid docid, int imaxoccs, int ictxwords) { Chrono chron; - LOGDEB2(("makeAbstract:%d: maxlen %d wWidth %d imaxoccs %d\n", chron.ms(), - m_rcldb->m_synthAbsLen, m_rcldb->m_synthAbsWordCtxLen, imaxoccs)); + LOGABS(("makeAbstract: docid %l imaxoccs %d ictxwords %d\n", + long(docid), imaxoccs, ictxwords)); // The (unprefixed) terms matched by this document vector matchedTerms; @@ -464,15 +464,15 @@ abstract_result Query::Native::makeAbstract(Xapian::docid docid, } } } - LOGABS(("makeAbstract:%d:chosen number of positions %d\n", - chron.millis(), totaloccs)); maxpos += ctxwords + 1; + LOGABS(("makeAbstract:%d:chosen number of positions %d\n", + chron.millis(), totaloccs)); // This can happen if there are term occurences in the keywords // etc. but not elsewhere ? if (totaloccs == 0) { - LOGDEB1(("makeAbstract: no occurrences\n")); - return ABSRES_ERROR; + LOGDEB(("makeAbstract: no occurrences\n")); + return ABSRES_OK; } // Walk all document's terms position lists and populate slots diff --git a/src/rcldb/rclquery.cpp b/src/rcldb/rclquery.cpp index d2e2dae6..e7cf93d2 100644 --- a/src/rcldb/rclquery.cpp +++ b/src/rcldb/rclquery.cpp @@ -318,15 +318,18 @@ abstract_result Query::makeDocAbstract(Doc &doc, abstract_result ret = ABSRES_ERROR; XAPTRY(ret = m_nq->makeAbstract(doc.xdocid, abstract, maxoccs, ctxwords), m_db->m_ndb->xrdb, m_reason); - if (!m_reason.empty()) + if (!m_reason.empty()) { + LOGDEB(("makeDocAbstract: makeAbstract error, reason: %s\n", + m_reason.c_str())); return ABSRES_ERROR; + } return ret; } bool Query::makeDocAbstract(Doc &doc, vector& abstract) { vector vpabs; - if (!makeDocAbstract(doc, vpabs)) + if (!makeDocAbstract(doc, vpabs)) return false; for (vector::const_iterator it = vpabs.begin(); it != vpabs.end(); it++) {