summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-01-27 19:03:15 +0000
committerArne H Juul <arnej@yahooinc.com>2022-01-28 10:50:12 +0000
commit2dba5d45094ef264532d56638418e703b297f3e0 (patch)
tree087b554dd2e106d214aff0b28c96eaf5ea88f0eb
parent73128406c5352542632933026d7e48e12df62b9e (diff)
pick the right attribute for streaming
* This would detect the wrong field name because with SearchVisitor all fields are available as attributes; SearchVisitor::PositionInserter would not be triggered because the wrong field name was hinted for attribute access.
-rw-r--r--searchlib/src/vespa/searchlib/features/distancefeature.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/features/distancefeature.cpp b/searchlib/src/vespa/searchlib/features/distancefeature.cpp
index d5a27d04216..518ade2a8f5 100644
--- a/searchlib/src/vespa/searchlib/features/distancefeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/distancefeature.cpp
@@ -225,9 +225,10 @@ DistanceBlueprint::setup(const IIndexEnvironment & env,
_attr_id = fi->id();
return setup_nns(env, arg);
}
- // could check if dt is DataType::INT64
// could check if ct is CollectionType::SINGLE or CollectionType::ARRAY)
- return setup_geopos(env, arg);
+ if (dt == DataType::INT64) {
+ return setup_geopos(env, arg);
+ }
}
vespalib::string z = document::PositionDataType::getZCurveFieldName(arg);
fi = env.getFieldByName(z);