|
a/src/rcldb/rcldoc.h |
|
b/src/rcldb/rcldoc.h |
|
... |
|
... |
17 |
#ifndef _RCLDOC_H_INCLUDED_
|
17 |
#ifndef _RCLDOC_H_INCLUDED_
|
18 |
#define _RCLDOC_H_INCLUDED_
|
18 |
#define _RCLDOC_H_INCLUDED_
|
19 |
|
19 |
|
20 |
#include <string>
|
20 |
#include <string>
|
21 |
#include <map>
|
21 |
#include <map>
|
22 |
|
|
|
23 |
#ifndef NO_NAMESPACES
|
|
|
24 |
using std::string;
|
22 |
using std::string;
|
25 |
using std::map;
|
23 |
using std::map;
|
|
|
24 |
|
|
|
25 |
#include "smallut.h"
|
|
|
26 |
|
26 |
namespace Rcl {
|
27 |
namespace Rcl {
|
27 |
#endif
|
|
|
28 |
|
28 |
|
29 |
/**
|
29 |
/**
|
30 |
* Dumb holder for document attributes and data.
|
30 |
* Dumb holder for document attributes and data.
|
31 |
*
|
31 |
*
|
32 |
* This is used both for indexing, where fields are filled-up by the
|
32 |
* This is used both for indexing, where fields are filled-up by the
|
|
... |
|
... |
137 |
|
137 |
|
138 |
///////////////////////////////////////////////////////////////////
|
138 |
///////////////////////////////////////////////////////////////////
|
139 |
|
139 |
|
140 |
void erase() {
|
140 |
void erase() {
|
141 |
url.erase();
|
141 |
url.erase();
|
|
|
142 |
idxurl.erase();
|
|
|
143 |
idxi = 0;
|
142 |
ipath.erase();
|
144 |
ipath.erase();
|
143 |
mimetype.erase();
|
145 |
mimetype.erase();
|
144 |
fmtime.erase();
|
146 |
fmtime.erase();
|
145 |
dmtime.erase();
|
147 |
dmtime.erase();
|
146 |
origcharset.erase();
|
148 |
origcharset.erase();
|
|
... |
|
... |
157 |
xdocid = 0;
|
159 |
xdocid = 0;
|
158 |
idxi = 0;
|
160 |
idxi = 0;
|
159 |
haspages = false;
|
161 |
haspages = false;
|
160 |
haschildren = false;
|
162 |
haschildren = false;
|
161 |
onlyxattr = false;
|
163 |
onlyxattr = false;
|
|
|
164 |
}
|
|
|
165 |
// Copy ensuring no shared string data, for threading issues.
|
|
|
166 |
void copyto(Doc *d) const {
|
|
|
167 |
d->url.assign(url.begin(), url.end());
|
|
|
168 |
d->idxurl.assign(idxurl.begin(), idxurl.end());
|
|
|
169 |
d->idxi = idxi;
|
|
|
170 |
d->ipath.assign(ipath.begin(), ipath.end());
|
|
|
171 |
d->mimetype.assign(mimetype.begin(), mimetype.end());
|
|
|
172 |
d->fmtime.assign(fmtime.begin(), fmtime.end());
|
|
|
173 |
d->dmtime.assign(dmtime.begin(), dmtime.end());
|
|
|
174 |
d->origcharset.assign(origcharset.begin(), origcharset.end());
|
|
|
175 |
map_ss_cp_noshr(meta, &d->meta);
|
|
|
176 |
d->syntabs = syntabs;
|
|
|
177 |
d->pcbytes.assign(pcbytes.begin(), pcbytes.end());
|
|
|
178 |
d->fbytes.assign(fbytes.begin(), fbytes.end());
|
|
|
179 |
d->dbytes.assign(dbytes.begin(), dbytes.end());
|
|
|
180 |
d->sig.assign(sig.begin(), sig.end());
|
|
|
181 |
d->text.assign(text.begin(), text.end());
|
|
|
182 |
d->pc = pc;
|
|
|
183 |
d->xdocid = xdocid;
|
|
|
184 |
d->idxi = idxi;
|
|
|
185 |
d->haspages = haspages;
|
|
|
186 |
d->haschildren = haschildren;
|
|
|
187 |
d->onlyxattr = onlyxattr;
|
162 |
}
|
188 |
}
|
163 |
Doc()
|
189 |
Doc()
|
164 |
: idxi(0), syntabs(false), pc(0), xdocid(0),
|
190 |
: idxi(0), syntabs(false), pc(0), xdocid(0),
|
165 |
haspages(false), haschildren(false), onlyxattr(false)
|
191 |
haspages(false), haschildren(false), onlyxattr(false)
|
166 |
{
|
192 |
{
|
|
... |
|
... |
245 |
static const string keyapptg; // apptag. Set from localfields (fsindexer)
|
271 |
static const string keyapptg; // apptag. Set from localfields (fsindexer)
|
246 |
static const string keybght; // beagle hit type ("beagleHitType")
|
272 |
static const string keybght; // beagle hit type ("beagleHitType")
|
247 |
};
|
273 |
};
|
248 |
|
274 |
|
249 |
|
275 |
|
250 |
#ifndef NO_NAMESPACES
|
|
|
251 |
}
|
276 |
}
|
252 |
#endif
|
|
|
253 |
|
277 |
|
254 |
#endif /* _RCLDOC_H_INCLUDED_ */
|
278 |
#endif /* _RCLDOC_H_INCLUDED_ */
|