diff options
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/features/dotproductfeature.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp index 354535b8853..fc71100dea6 100644 --- a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp @@ -672,7 +672,7 @@ createForDirectIntegerWSet(const IAttributeVector * attribute, const Property & IntegerVectorT<T> vector; WeightedSetParser::parse(prop.get(), vector); return vector.empty() - ? &stash.create<SingleZeroValueExecutor>(); + ? &stash.create<SingleZeroValueExecutor>() : createForDirectWSetImpl<IntegerAttributeTemplate<T>>(attribute, std::move(vector), stash); } @@ -684,7 +684,7 @@ createTypedWsetExecutor(const IAttributeVector * attribute, const Property & pro EnumVector vector(attribute); WeightedSetParser::parse(prop.get(), vector); if (vector.empty()) { - return &stash.create<SingleZeroValueExecutor>() + return &stash.create<SingleZeroValueExecutor>(); } const IWeightedIndexVector * getEnumHandles = dynamic_cast<const IWeightedIndexVector *>(attribute); if (supportsGetEnumHandles(getEnumHandles)) { @@ -695,9 +695,10 @@ createTypedWsetExecutor(const IAttributeVector * attribute, const Property & pro if (attribute->isStringType()) { StringVector vector; WeightedSetParser::parse(prop.get(), vector); - return vector.empty() - ? &stash.create<SingleZeroValueExecutor>() - : &stash.create<DotProductExecutorByCopy<StringVector, WeightedConstCharContent>>(attribute, std::move(vector)); + if (vector.empty()) { + return &stash.create<SingleZeroValueExecutor>(); + } + return &stash.create<DotProductExecutorByCopy<StringVector, WeightedConstCharContent>>(attribute, std::move(vector)); } else if (attribute->isIntegerType()) { if (attribute->getBasicType() == BasicType::INT32) { return createForDirectIntegerWSet<int32_t>(attribute, prop, stash); |