Prevent highligting of bogus terms in results (prevent path elts, negative queries or internal stuff)

This commit is contained in:
Jean-Francois Dockes
2015-08-08 21:56:45 +02:00
parent 79d419a010
commit c8d34dc8ba
8 changed files with 58 additions and 46 deletions
+2
View File
@@ -867,6 +867,8 @@ bool RclConfig::readFieldsConfig(const string& cnferrloc)
ft.boost = atof(tval.c_str());
if (attrs.get("pfxonly", tval))
ft.pfxonly = stringToBool(tval);
if (attrs.get("noterms", tval))
ft.noterms = stringToBool(tval);
m_fldtotraits[stringtolower(*it)] = ft;
LOGDEB2(("readFieldsConfig: [%s] -> [%s] %d %.1f\n",
it->c_str(), ft.pfx.c_str(), ft.wdfinc, ft.boost));
+2 -2
View File
@@ -66,9 +66,9 @@ struct FieldTraits {
int wdfinc; // Index time term frequency increment (default 1)
double boost; // Query time boost (default 1.0)
bool pfxonly; // Suppress prefix-less indexing
bool noterms; // Don't add term to highlight data (e.g.: rclbes)
FieldTraits()
: wdfinc(1), boost(1.0), pfxonly(false)
: wdfinc(1), boost(1.0), pfxonly(false), noterms(false)
{}
};