|
a/src/rcldb/rclabstract.cpp |
|
b/src/rcldb/rclabstract.cpp |
|
... |
|
... |
281 |
|
281 |
|
282 |
// We try to use a page which matches the "best" term. Get a sorted list
|
282 |
// We try to use a page which matches the "best" term. Get a sorted list
|
283 |
multimap<double, vector<string> > byQ;
|
283 |
multimap<double, vector<string> > byQ;
|
284 |
double totalweight = qualityTerms(docid, terms, byQ);
|
284 |
double totalweight = qualityTerms(docid, terms, byQ);
|
285 |
|
285 |
|
286 |
for (map<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
|
286 |
for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
|
287 |
mit != byQ.rend(); mit++) {
|
287 |
mit != byQ.rend(); mit++) {
|
288 |
for (vector<string>::const_iterator qit = mit->second.begin();
|
288 |
for (vector<string>::const_iterator qit = mit->second.begin();
|
289 |
qit != mit->second.end(); qit++) {
|
289 |
qit != mit->second.end(); qit++) {
|
290 |
string qterm = *qit;
|
290 |
string qterm = *qit;
|
291 |
Xapian::PositionIterator pos;
|
291 |
Xapian::PositionIterator pos;
|
|
... |
|
... |
382 |
chron.ms(), maxtotaloccs, ctxwords));
|
382 |
chron.ms(), maxtotaloccs, ctxwords));
|
383 |
|
383 |
|
384 |
int ret = ABSRES_OK;
|
384 |
int ret = ABSRES_OK;
|
385 |
|
385 |
|
386 |
// Let's go populate
|
386 |
// Let's go populate
|
387 |
for (map<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
|
387 |
for (multimap<double, vector<string> >::reverse_iterator mit = byQ.rbegin();
|
388 |
mit != byQ.rend(); mit++) {
|
388 |
mit != byQ.rend(); mit++) {
|
389 |
unsigned int maxgrpoccs;
|
389 |
unsigned int maxgrpoccs;
|
390 |
float q;
|
390 |
float q;
|
391 |
if (byQ.size() == 1) {
|
391 |
if (byQ.size() == 1) {
|
392 |
maxgrpoccs = maxtotaloccs;
|
392 |
maxgrpoccs = maxtotaloccs;
|