Don't insert empty multivalued attribute fields in summary
@@ -149,9 +149,13 @@ MultiAttrDFW::insertField(uint32_t docid, GetDocsumsState *state, ResType, Inser
using vespalib::slime::Cursor;
using vespalib::Memory;
const IAttributeVector & v = vec(*state);
- uint32_t entries = v.getValueCount(docid);
bool isWeightedSet = v.hasWeightedSetType();
+ uint32_t entries = v.getValueCount(docid);
+ if (entries == 0) {
+ return; // Don't insert empty fields
+ }
+
Cursor &arr = target.insertArray();
BasicType::Type t = v.getBasicType();
switch (t) {
