This commit is contained in:
Jean-Francois Dockes 2020-10-14 11:57:18 +02:00
parent ceecf5ff43
commit 2d21d4a460
4 changed files with 111 additions and 116 deletions

View File

@ -1115,20 +1115,19 @@ set<string> RclConfig::getIndexedFields() const
string RclConfig::fieldCanon(const string& f) const string RclConfig::fieldCanon(const string& f) const
{ {
string fld = stringtolower(f); string fld = stringtolower(f);
map<string, string>::const_iterator it = m_aliastocanon.find(fld); const auto it = m_aliastocanon.find(fld);
if (it != m_aliastocanon.end()) { if (it != m_aliastocanon.end()) {
LOGDEB1("RclConfig::fieldCanon: [" << f << "] -> [" << it->second << LOGDEB1("RclConfig::fieldCanon: [" << f << "] -> [" << it->second <<
"]\n"); "]\n");
return it->second; return it->second;
} }
LOGDEB1("RclConfig::fieldCanon: [" << (f) << "] -> [" << (fld) << "]\n"); LOGDEB1("RclConfig::fieldCanon: [" << f << "] -> [" << fld << "]\n");
return fld; return fld;
} }
string RclConfig::fieldQCanon(const string& f) const string RclConfig::fieldQCanon(const string& f) const
{ {
string fld = stringtolower(f); const auto it = m_aliastoqcanon.find(stringtolower(f));
map<string, string>::const_iterator it = m_aliastoqcanon.find(fld);
if (it != m_aliastoqcanon.end()) { if (it != m_aliastoqcanon.end()) {
LOGDEB1("RclConfig::fieldQCanon: [" << f << "] -> [" << it->second << LOGDEB1("RclConfig::fieldQCanon: [" << f << "] -> [" << it->second <<
"]\n"); "]\n");

View File

@ -442,5 +442,3 @@ bool recoll_ismainthread()
{ {
return std::this_thread::get_id() == mainthread_id; return std::this_thread::get_id() == mainthread_id;
} }

View File

@ -380,4 +380,3 @@ initrclextract(void)
return module; return module;
#endif #endif
} }

View File

@ -1066,7 +1066,7 @@ Query_executesd(recoll_QueryObject* self, PyObject *args, PyObject *kwargs)
// Move some data from the dedicated fields to the meta array to make // Move some data from the dedicated fields to the meta array to make
// fetching attributes easier. Needed because we only use the meta // fetching attributes easier. Needed because we only use the meta
// array when enumerating keys. Also for url which is also formatted. // array when enumerating keys. Also for url which is also formatted.
// But not that some fields are not copied, and are only reachable if // But note that some fields are not copied, and are only reachable if
// one knows their name (e.g. xdocid). // one knows their name (e.g. xdocid).
static void movedocfields(const RclConfig* rclconfig, Rcl::Doc *doc) static void movedocfields(const RclConfig* rclconfig, Rcl::Doc *doc)
{ {
@ -2205,4 +2205,3 @@ PyInit_recoll(void)
return module; return module;
#endif #endif
} }