|
a/src/query/docseqdb.cpp |
|
b/src/query/docseqdb.cpp |
|
... |
|
... |
19 |
|
19 |
|
20 |
#include "docseqdb.h"
|
20 |
#include "docseqdb.h"
|
21 |
#include "rcldb.h"
|
21 |
#include "rcldb.h"
|
22 |
#include "debuglog.h"
|
22 |
#include "debuglog.h"
|
23 |
#include "internfile.h"
|
23 |
#include "internfile.h"
|
|
|
24 |
#include "wasatorcl.h"
|
24 |
|
25 |
|
25 |
DocSequenceDb::DocSequenceDb(RefCntr<Rcl::Query> q, const string &t,
|
26 |
DocSequenceDb::DocSequenceDb(RefCntr<Rcl::Query> q, const string &t,
|
26 |
RefCntr<Rcl::SearchData> sdata)
|
27 |
RefCntr<Rcl::SearchData> sdata)
|
27 |
: DocSequence(t), m_q(q), m_sdata(sdata), m_fsdata(sdata),
|
28 |
: DocSequence(t), m_q(q), m_sdata(sdata), m_fsdata(sdata),
|
28 |
m_rescnt(-1),
|
29 |
m_rescnt(-1),
|
|
... |
|
... |
124 |
|
125 |
|
125 |
for (unsigned int i = 0; i < fs.crits.size(); i++) {
|
126 |
for (unsigned int i = 0; i < fs.crits.size(); i++) {
|
126 |
switch (fs.crits[i]) {
|
127 |
switch (fs.crits[i]) {
|
127 |
case DocSeqFiltSpec::DSFS_MIMETYPE:
|
128 |
case DocSeqFiltSpec::DSFS_MIMETYPE:
|
128 |
m_fsdata->addFiletype(fs.values[i]);
|
129 |
m_fsdata->addFiletype(fs.values[i]);
|
|
|
130 |
break;
|
|
|
131 |
case DocSeqFiltSpec::DSFS_QLANG:
|
|
|
132 |
{
|
|
|
133 |
if (m_q.isNull())
|
|
|
134 |
break;
|
|
|
135 |
|
|
|
136 |
string reason;
|
|
|
137 |
Rcl::SearchData *sd =
|
|
|
138 |
wasaStringToRcl(m_q->whatDb()->getConf(),
|
|
|
139 |
fs.values[i], reason);
|
|
|
140 |
if (sd) {
|
|
|
141 |
Rcl::SearchDataClauseSub *cl1 =
|
|
|
142 |
new Rcl::SearchDataClauseSub(Rcl::SCLT_SUB,
|
|
|
143 |
RefCntr<Rcl::SearchData>(sd));
|
|
|
144 |
m_fsdata->addClause(cl1);
|
|
|
145 |
}
|
|
|
146 |
}
|
|
|
147 |
break;
|
|
|
148 |
default:
|
|
|
149 |
break;
|
129 |
}
|
150 |
}
|
130 |
}
|
151 |
}
|
131 |
m_isFiltered = true;
|
152 |
m_isFiltered = true;
|
132 |
} else {
|
153 |
} else {
|
133 |
m_fsdata = m_sdata;
|
154 |
m_fsdata = m_sdata;
|