Prevent highligting of bogus terms in results (prevent path elts, negative queries or internal stuff)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user