|
3 | 3 | #include "nativefieldmatchfeature.h" |
4 | 4 | #include "valuefeature.h" |
5 | 5 | #include "utils.h" |
| 6 | +#include <vespa/searchlib/fef/featurenamebuilder.h> |
6 | 7 | #include <vespa/searchlib/fef/fieldinfo.h> |
7 | 8 | #include <vespa/searchlib/fef/indexproperties.h> |
8 | 9 | #include <vespa/searchlib/fef/itablemanager.h> |
@@ -161,14 +162,26 @@ NativeFieldMatchBlueprint::setup(const IIndexEnvironment & env, |
161 | 162 | { |
162 | 163 | param.field = false; |
163 | 164 | } |
164 | | - Property afl = env.getProperties().lookup(getBaseName(), "averageFieldLength", info->name()); |
| 165 | + std::string alt_name = FeatureNameBuilder() |
| 166 | + .baseName(getBaseName()) |
| 167 | + .parameter(info->name()) |
| 168 | + .buildName(); |
| 169 | + |
| 170 | + Property afl = env.getProperties().lookup(alt_name, "averageFieldLength"); |
| 171 | + if (!afl.found()) { |
| 172 | + afl = env.getProperties().lookup(getBaseName(), "averageFieldLength", info->name()); |
| 173 | + } |
165 | 174 | if (afl.found()) { |
166 | 175 | param.averageFieldLength = util::strToNum<uint32_t>(afl.get()); |
167 | 176 | } |
168 | 177 |
|
169 | | - param.firstOccImportance = util::strToNum<feature_t> |
170 | | - (env.getProperties().lookup(getBaseName(), "firstOccurrenceImportance", info->name()). |
171 | | - get(defaultFirstOccImportance)); |
| 178 | + std::string alt_importance = env.getProperties() |
| 179 | + .lookup(alt_name, "firstOccurrenceImportance") |
| 180 | + .get(defaultFirstOccImportance); |
| 181 | + std::string importance = env.getProperties() |
| 182 | + .lookup(getBaseName(), "firstOccurrenceImportance", info->name()) |
| 183 | + .get(alt_importance); |
| 184 | + param.firstOccImportance = util::strToNum<feature_t>(importance); |
172 | 185 |
|
173 | 186 | if (NativeRankBlueprint::useTableNormalization(env)) { |
174 | 187 | const Table * fo = param.firstOccTable; |
|
0 commit comments