|
a/src/query/recollq.cpp |
|
b/src/query/recollq.cpp |
|
... |
|
... |
284 |
}
|
284 |
}
|
285 |
|
285 |
|
286 |
Rcl::SearchData *sd = 0;
|
286 |
Rcl::SearchData *sd = 0;
|
287 |
|
287 |
|
288 |
if (op_flags & (OPT_a|OPT_o|OPT_f)) {
|
288 |
if (op_flags & (OPT_a|OPT_o|OPT_f)) {
|
289 |
sd = new Rcl::SearchData(Rcl::SCLT_OR);
|
289 |
sd = new Rcl::SearchData(Rcl::SCLT_OR, stemlang);
|
290 |
Rcl::SearchDataClause *clp = 0;
|
290 |
Rcl::SearchDataClause *clp = 0;
|
291 |
if (op_flags & OPT_f) {
|
291 |
if (op_flags & OPT_f) {
|
292 |
clp = new Rcl::SearchDataClauseFilename(qs);
|
292 |
clp = new Rcl::SearchDataClauseFilename(qs);
|
293 |
} else {
|
293 |
} else {
|
294 |
// If there is no white space inside the query, then the user
|
294 |
// If there is no white space inside the query, then the user
|
|
... |
|
... |
303 |
qs);
|
303 |
qs);
|
304 |
}
|
304 |
}
|
305 |
if (sd)
|
305 |
if (sd)
|
306 |
sd->addClause(clp);
|
306 |
sd->addClause(clp);
|
307 |
} else {
|
307 |
} else {
|
308 |
sd = wasaStringToRcl(rclconfig, qs, reason);
|
308 |
sd = wasaStringToRcl(rclconfig, stemlang, qs, reason);
|
309 |
}
|
309 |
}
|
310 |
|
310 |
|
311 |
if (!sd) {
|
311 |
if (!sd) {
|
312 |
cerr << "Query string interpretation failed: " << reason << endl;
|
312 |
cerr << "Query string interpretation failed: " << reason << endl;
|
313 |
return 1;
|
313 |
return 1;
|
314 |
}
|
314 |
}
|
315 |
sd->setStemlang(stemlang);
|
|
|
316 |
|
315 |
|
317 |
RefCntr<Rcl::SearchData> rq(sd);
|
316 |
RefCntr<Rcl::SearchData> rq(sd);
|
318 |
Rcl::Query query(&rcldb);
|
317 |
Rcl::Query query(&rcldb);
|
319 |
if (op_flags & OPT_S) {
|
318 |
if (op_flags & OPT_S) {
|
320 |
query.setSortBy(sortfield, (op_flags & OPT_D) ? false : true);
|
319 |
query.setSortBy(sortfield, (op_flags & OPT_D) ? false : true);
|