|
a/src/rcldb/rclterms.cpp |
|
b/src/rcldb/rclterms.cpp |
|
... |
|
... |
57 |
if (unacmaybefold(pattern, pat1, "UTF-8", UNACOP_UNACFOLD)) {
|
57 |
if (unacmaybefold(pattern, pat1, "UTF-8", UNACOP_UNACFOLD)) {
|
58 |
pattern.swap(pat1);
|
58 |
pattern.swap(pat1);
|
59 |
}
|
59 |
}
|
60 |
|
60 |
|
61 |
TermMatchResult result;
|
61 |
TermMatchResult result;
|
62 |
if (!termMatch(ET_WILD, string(), pattern, result, max,
|
62 |
if (!idxTermMatch(ET_WILD, string(), pattern, result, max,
|
63 |
unsplitFilenameFieldName))
|
63 |
unsplitFilenameFieldName))
|
64 |
return false;
|
64 |
return false;
|
65 |
for (vector<TermMatchEntry>::const_iterator it = result.entries.begin();
|
65 |
for (vector<TermMatchEntry>::const_iterator it = result.entries.begin();
|
66 |
it != result.entries.end(); it++)
|
66 |
it != result.entries.end(); it++)
|
67 |
names.push_back(it->term);
|
67 |
names.push_back(it->term);
|
68 |
|
68 |
|
|
... |
|
... |
79 |
{
|
79 |
{
|
80 |
LOGDEB(("Rcl::Db:maxYearSpan\n"));
|
80 |
LOGDEB(("Rcl::Db:maxYearSpan\n"));
|
81 |
*minyear = 1000000;
|
81 |
*minyear = 1000000;
|
82 |
*maxyear = -1000000;
|
82 |
*maxyear = -1000000;
|
83 |
TermMatchResult result;
|
83 |
TermMatchResult result;
|
84 |
if (!termMatch(ET_WILD, string(), "*", result, -1, "xapyear")) {
|
84 |
if (!idxTermMatch(ET_WILD, string(), "*", result, -1, "xapyear")) {
|
85 |
LOGINFO(("Rcl::Db:maxYearSpan: termMatch failed\n"));
|
85 |
LOGINFO(("Rcl::Db:maxYearSpan: termMatch failed\n"));
|
86 |
return false;
|
86 |
return false;
|
87 |
}
|
87 |
}
|
88 |
for (vector<TermMatchEntry>::const_iterator it = result.entries.begin();
|
88 |
for (vector<TermMatchEntry>::const_iterator it = result.entries.begin();
|
89 |
it != result.entries.end(); it++) {
|
89 |
it != result.entries.end(); it++) {
|
|
... |
|
... |
92 |
if (year < *minyear)
|
92 |
if (year < *minyear)
|
93 |
*minyear = year;
|
93 |
*minyear = year;
|
94 |
if (year > *maxyear)
|
94 |
if (year > *maxyear)
|
95 |
*maxyear = year;
|
95 |
*maxyear = year;
|
96 |
}
|
96 |
}
|
|
|
97 |
}
|
|
|
98 |
return true;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
bool Db::getAllDbMimeTypes(std::vector<std::string>& exp)
|
|
|
102 |
{
|
|
|
103 |
Rcl::TermMatchResult res;
|
|
|
104 |
if (!idxTermMatch(Rcl::Db::ET_WILD, "", "*", res, -1, "mtype")) {
|
|
|
105 |
return false;
|
|
|
106 |
}
|
|
|
107 |
for (vector<Rcl::TermMatchEntry>::const_iterator rit = res.entries.begin();
|
|
|
108 |
rit != res.entries.end(); rit++) {
|
|
|
109 |
exp.push_back(Rcl::strip_prefix(rit->term));
|
97 |
}
|
110 |
}
|
98 |
return true;
|
111 |
return true;
|
99 |
}
|
112 |
}
|
100 |
|
113 |
|
101 |
class TermMatchCmpByWcf {
|
114 |
class TermMatchCmpByWcf {
|