|
a/src/rcldb/rclquery.cpp |
|
b/src/rcldb/rclquery.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: rclquery.cpp,v 1.3 2008-07-01 11:51:51 dockes Exp $ (C) 2008 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: rclquery.cpp,v 1.4 2008-09-05 10:34:17 dockes Exp $ (C) 2008 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
|
4 |
|
5 |
#include <list>
|
5 |
#include <list>
|
6 |
#include <vector>
|
6 |
#include <vector>
|
7 |
|
7 |
|
|
... |
|
... |
301 |
first, last,
|
301 |
first, last,
|
302 |
m_nq->mset.get_matches_lower_bound()));
|
302 |
m_nq->mset.get_matches_lower_bound()));
|
303 |
|
303 |
|
304 |
Xapian::Document xdoc = m_nq->mset[xapi-first].get_document();
|
304 |
Xapian::Document xdoc = m_nq->mset[xapi-first].get_document();
|
305 |
Xapian::docid docid = *(m_nq->mset[xapi-first]);
|
305 |
Xapian::docid docid = *(m_nq->mset[xapi-first]);
|
|
|
306 |
int pc = m_nq->mset.convert_to_percent(m_nq->mset[xapi-first]);
|
306 |
if (percent)
|
307 |
if (percent)
|
307 |
*percent = m_nq->mset.convert_to_percent(m_nq->mset[xapi-first]);
|
308 |
*percent = pc;
|
308 |
|
309 |
|
309 |
// Parse xapian document's data and populate doc fields
|
310 |
// Parse xapian document's data and populate doc fields
|
310 |
string data = xdoc.get_data();
|
311 |
string data = xdoc.get_data();
|
311 |
return m_db->m_ndb->dbDataToRclDoc(docid, data, doc);
|
312 |
return m_db->m_ndb->dbDataToRclDoc(docid, data, doc, pc);
|
312 |
}
|
313 |
}
|
313 |
|
314 |
|
314 |
list<string> Query::expand(const Doc &doc)
|
315 |
list<string> Query::expand(const Doc &doc)
|
315 |
{
|
316 |
{
|
316 |
list<string> res;
|
317 |
list<string> res;
|