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.
@@ -225,10 +225,11 @@ 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)
+ if (dt == DataType::INT64) {
return setup_geopos(env, arg);
}
+ }
vespalib::string z = document::PositionDataType::getZCurveFieldName(arg);
fi = env.getFieldByName(z);
if (fi != nullptr && fi->hasAttribute()) {
