|
a/src/rcldb/searchdata.cpp |
|
b/src/rcldb/searchdata.cpp |
|
... |
|
... |
247 |
Xapian::Query(Xapian::Query::OP_OR, tq, Xapian::Query(term));
|
247 |
Xapian::Query(Xapian::Query::OP_OR, tq, Xapian::Query(term));
|
248 |
}
|
248 |
}
|
249 |
xq = xq.empty() ? tq : Xapian::Query(Xapian::Query::OP_FILTER, xq, tq);
|
249 |
xq = xq.empty() ? tq : Xapian::Query(Xapian::Query::OP_FILTER, xq, tq);
|
250 |
}
|
250 |
}
|
251 |
|
251 |
|
|
|
252 |
// Add the directory filtering clause
|
|
|
253 |
if (!m_topdir.empty()) {
|
|
|
254 |
vector<string> vpath;
|
|
|
255 |
stringToTokens(m_topdir, vpath, "/");
|
|
|
256 |
vector<string> pvpath;
|
|
|
257 |
pvpath.push_back(pathelt_prefix);
|
|
|
258 |
for (vector<string>::const_iterator it = vpath.begin();
|
|
|
259 |
it != vpath.end(); it++){
|
|
|
260 |
pvpath.push_back(pathelt_prefix + *it);
|
|
|
261 |
}
|
|
|
262 |
xq = Xapian::Query(Xapian::Query::OP_FILTER, xq,
|
|
|
263 |
Xapian::Query(Xapian::Query::OP_PHRASE,
|
|
|
264 |
pvpath.begin(), pvpath.end()));
|
|
|
265 |
}
|
|
|
266 |
|
252 |
*((Xapian::Query *)d) = xq;
|
267 |
*((Xapian::Query *)d) = xq;
|
253 |
return true;
|
268 |
return true;
|
254 |
}
|
269 |
}
|
255 |
|
270 |
|
256 |
// Add clause to current list. OR lists cant have EXCL clauses.
|
271 |
// Add clause to current list. OR lists cant have EXCL clauses.
|