|
a/src/rcldb/rcldoc.h |
|
b/src/rcldb/rcldoc.h |
|
... |
|
... |
168 |
} else {
|
168 |
} else {
|
169 |
return false;
|
169 |
return false;
|
170 |
}
|
170 |
}
|
171 |
}
|
171 |
}
|
172 |
|
172 |
|
|
|
173 |
// Create entry or append text to existing entry.
|
|
|
174 |
bool addmeta(const string& nm, const string& value)
|
|
|
175 |
{
|
|
|
176 |
map<string,string>::iterator mit = meta.find(nm);
|
|
|
177 |
if (mit == meta.end()) {
|
|
|
178 |
meta[nm] = value;
|
|
|
179 |
} else if (mit->second.empty()) {
|
|
|
180 |
mit->second = value;
|
|
|
181 |
} else {
|
|
|
182 |
mit->second += string(" - ") + value;
|
|
|
183 |
}
|
|
|
184 |
return true;
|
|
|
185 |
}
|
|
|
186 |
|
173 |
void dump(bool dotext=false) const;
|
187 |
void dump(bool dotext=false) const;
|
174 |
|
188 |
|
175 |
// The official names for recoll native fields when used in a text
|
189 |
// The official names for recoll native fields when used in a text
|
176 |
// context (ie: the python interface duplicates some of the fixed
|
190 |
// context (ie: the python interface duplicates some of the fixed
|
177 |
// fields in the meta array, these are the names used). Defined in
|
191 |
// fields in the meta array, these are the names used). Defined in
|
178 |
// rcldoc.cpp. For fields stored in the meta[] array (ie, title,
|
192 |
// rcldoc.cpp. Fields stored in the meta[] array (ie, title,
|
179 |
// author), filters _must_ use these values
|
193 |
// author), _must_ use these canonical values, not aliases. This is
|
|
|
194 |
// enforced in internfile.cpp and misc other bits of metadata-gathering
|
|
|
195 |
// code
|
180 |
static const string keyurl; // url
|
196 |
static const string keyurl; // url
|
181 |
static const string keyfn; // file name
|
197 |
static const string keyfn; // file name
|
182 |
static const string keyipt; // ipath
|
198 |
static const string keyipt; // ipath
|
183 |
static const string keytp; // mime type
|
199 |
static const string keytp; // mime type
|
184 |
static const string keyfmt; // file mtime
|
200 |
static const string keyfmt; // file mtime
|