|
a/src/query/docseq.cpp |
|
b/src/query/docseq.cpp |
|
... |
|
... |
16 |
*/
|
16 |
*/
|
17 |
#include "docseq.h"
|
17 |
#include "docseq.h"
|
18 |
#include "filtseq.h"
|
18 |
#include "filtseq.h"
|
19 |
#include "sortseq.h"
|
19 |
#include "sortseq.h"
|
20 |
#include "debuglog.h"
|
20 |
#include "debuglog.h"
|
|
|
21 |
#include "internfile.h"
|
21 |
|
22 |
|
22 |
string DocSequence::o_sort_trans;
|
23 |
string DocSequence::o_sort_trans;
|
23 |
string DocSequence::o_filt_trans;
|
24 |
string DocSequence::o_filt_trans;
|
24 |
|
25 |
|
25 |
int DocSequence::getSeqSlice(int offs, int cnt, vector<ResListEntry>& result)
|
26 |
int DocSequence::getSeqSlice(int offs, int cnt, vector<ResListEntry>& result)
|
|
... |
|
... |
31 |
result.pop_back();
|
32 |
result.pop_back();
|
32 |
return ret;
|
33 |
return ret;
|
33 |
}
|
34 |
}
|
34 |
}
|
35 |
}
|
35 |
return ret;
|
36 |
return ret;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
bool DocSequence::getEnclosing(Rcl::Doc& doc, Rcl::Doc& pdoc)
|
|
|
40 |
{
|
|
|
41 |
// Note: no need for setQuery here, we're just passing through a
|
|
|
42 |
// query-independant request
|
|
|
43 |
|
|
|
44 |
string udi;
|
|
|
45 |
if (!FileInterner::getEnclosing(doc.url, doc.ipath, pdoc.url, pdoc.ipath,
|
|
|
46 |
udi))
|
|
|
47 |
return false;
|
|
|
48 |
bool dbret = getDb()->getDoc(udi, pdoc);
|
|
|
49 |
return dbret && pdoc.pc != -1;
|
36 |
}
|
50 |
}
|
37 |
|
51 |
|
38 |
// Remove stacked modifying sources (sort, filter) until we get to a real one
|
52 |
// Remove stacked modifying sources (sort, filter) until we get to a real one
|
39 |
void DocSource::stripStack()
|
53 |
void DocSource::stripStack()
|
40 |
{
|
54 |
{
|
|
... |
|
... |
105 |
LOGDEB2(("DocSource::setSortSpec\n"));
|
119 |
LOGDEB2(("DocSource::setSortSpec\n"));
|
106 |
m_sspec = s;
|
120 |
m_sspec = s;
|
107 |
buildStack();
|
121 |
buildStack();
|
108 |
return true;
|
122 |
return true;
|
109 |
}
|
123 |
}
|
|
|
124 |
|