a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp
...
...
92
static const string cstr_syntAbs("?!#@");
92
static const string cstr_syntAbs("?!#@");
93
93
94
// Only ONE field name inside the index data record differs from the
94
// Only ONE field name inside the index data record differs from the
95
// Rcl::Doc ones: caption<->title, for a remnant of compatibility with
95
// Rcl::Doc ones: caption<->title, for a remnant of compatibility with
96
// omega
96
// omega
97
static const string cstr_keycap("caption");
98
97
99
// Static/Default table for field->prefix/weight translation. 
98
// Static/Default table for field->prefix/weight translation. 
100
// This is logically const after initialization. Can't use a
99
// This is logically const after initialization. Can't use a
101
// static object to init this as the static std::string objects may
100
// static object to init this as the static std::string objects may
102
// not be ready.
101
// not be ready.
...
...
123
    fldToTraits[Doc::keyabs] = FieldTraits();
122
    fldToTraits[Doc::keyabs] = FieldTraits();
124
123
125
    fldToTraits["ext"] = FieldTraits("XE");
124
    fldToTraits["ext"] = FieldTraits("XE");
126
    fldToTraits[Doc::keyfn] = FieldTraits("XSFN");
125
    fldToTraits[Doc::keyfn] = FieldTraits("XSFN");
127
126
128
    fldToTraits[cstr_keycap] = FieldTraits("S");
127
    fldToTraits[cstr_caption] = FieldTraits("S");
129
    fldToTraits[Doc::keytt] = FieldTraits("S");
128
    fldToTraits[Doc::keytt] = FieldTraits("S");
130
    fldToTraits["subject"] = FieldTraits("S");
129
    fldToTraits["subject"] = FieldTraits("S");
131
130
132
    fldToTraits[Doc::keyau] = FieldTraits("A");
131
    fldToTraits[Doc::keyau] = FieldTraits("A");
133
    fldToTraits["creator"] = FieldTraits("A");
132
    fldToTraits["creator"] = FieldTraits("A");
...
...
196
    parms.get(Doc::keyurl, doc.url);
195
    parms.get(Doc::keyurl, doc.url);
197
    parms.get(Doc::keytp, doc.mimetype);
196
    parms.get(Doc::keytp, doc.mimetype);
198
    parms.get(Doc::keyfmt, doc.fmtime);
197
    parms.get(Doc::keyfmt, doc.fmtime);
199
    parms.get(Doc::keydmt, doc.dmtime);
198
    parms.get(Doc::keydmt, doc.dmtime);
200
    parms.get(Doc::keyoc, doc.origcharset);
199
    parms.get(Doc::keyoc, doc.origcharset);
201
    parms.get(cstr_keycap, doc.meta[Doc::keytt]);
200
    parms.get(cstr_caption, doc.meta[Doc::keytt]);
202
    parms.get(Doc::keykw, doc.meta[Doc::keykw]);
201
    parms.get(Doc::keykw, doc.meta[Doc::keykw]);
203
    parms.get(Doc::keyabs, doc.meta[Doc::keyabs]);
202
    parms.get(Doc::keyabs, doc.meta[Doc::keyabs]);
204
    // Possibly remove synthetic abstract indicator (if it's there, we
203
    // Possibly remove synthetic abstract indicator (if it's there, we
205
    // used to index the beginning of the text as abstract).
204
    // used to index the beginning of the text as abstract).
206
    doc.syntabs = false;
205
    doc.syntabs = false;
...
...
1177
    if (doc.meta[Doc::keytt].empty())
1176
    if (doc.meta[Doc::keytt].empty())
1178
    doc.meta[Doc::keytt] = doc.utf8fn;
1177
    doc.meta[Doc::keytt] = doc.utf8fn;
1179
    doc.meta[Doc::keytt] = 
1178
    doc.meta[Doc::keytt] = 
1180
    neutchars(truncate_to_word(doc.meta[Doc::keytt], 150), cstr_nc);
1179
    neutchars(truncate_to_word(doc.meta[Doc::keytt], 150), cstr_nc);
1181
    if (!doc.meta[Doc::keytt].empty())
1180
    if (!doc.meta[Doc::keytt].empty())
1182
    RECORD_APPEND(record, cstr_keycap, doc.meta[Doc::keytt]);
1181
    RECORD_APPEND(record, cstr_caption, doc.meta[Doc::keytt]);
1183
1182
1184
    trimstring(doc.meta[Doc::keykw], " \t\r\n");
1183
    trimstring(doc.meta[Doc::keykw], " \t\r\n");
1185
    doc.meta[Doc::keykw] = 
1184
    doc.meta[Doc::keykw] = 
1186
    neutchars(truncate_to_word(doc.meta[Doc::keykw], 300), cstr_nc);
1185
    neutchars(truncate_to_word(doc.meta[Doc::keykw], 300), cstr_nc);
1187
    if (!doc.meta[Doc::keykw].empty())
1186
    if (!doc.meta[Doc::keykw].empty())
...
...
1524
    // If pattern is not capitalized, not quoted (quoted pattern can't
1523
    // If pattern is not capitalized, not quoted (quoted pattern can't
1525
    // get here currently anyway), and has no wildcards, we add * at
1524
    // get here currently anyway), and has no wildcards, we add * at
1526
    // each end: match any substring
1525
    // each end: match any substring
1527
    if (pattern[0] == '"' && pattern[pattern.size()-1] == '"') {
1526
    if (pattern[0] == '"' && pattern[pattern.size()-1] == '"') {
1528
    pattern = pattern.substr(1, pattern.size() -2);
1527
    pattern = pattern.substr(1, pattern.size() -2);
1529
    } else if (pattern.find_first_of("*?[") == string::npos && 
1528
    } else if (pattern.find_first_of(cstr_minwilds) == string::npos && 
1530
           !unaciscapital(pattern)) {
1529
           !unaciscapital(pattern)) {
1531
    pattern = "*" + pattern + "*";
1530
    pattern = "*" + pattern + "*";
1532
    } // else let it be
1531
    } // else let it be
1533
1532
1534
    LOGDEB(("Rcl::Db::filenameWildExp: pattern: [%s]\n", pattern.c_str()));
1533
    LOGDEB(("Rcl::Db::filenameWildExp: pattern: [%s]\n", pattern.c_str()));