weaviate/weaviate · error

unknown data type ArrayEach %v

Error message

unknown data type ArrayEach %v

What it means

When unmarshalling an array-valued property, each element's value type is switch-dispatched; only Number, String, Boolean, and Object elements are supported. If an array element has any other jsonparser type (e.g. Null or a nested Array), the parser returns "unknown data type ArrayEach". Nested arrays inside array properties are not supported by this fast-path parser.

Source

Thrown at entities/storobj/storage_object.go:1446

					var val interface{}

					switch innerDataType {
					case jsonparser.Number, jsonparser.String, jsonparser.Boolean:
						val, err = parseValues(innerDataType, innerValue)
						if err != nil {
							returnError = err
							return
						}
					case jsonparser.Object:
						nestedProps := map[string]interface{}{}
						err := json.Unmarshal(innerValue, &nestedProps)
						if err != nil {
							returnError = err
							return
						}
						val = nestedProps
					default:
						returnError = fmt.Errorf("unknown data type ArrayEach %v", innerDataType)
						return
					}
					array = append(array, val)
				})
				if err != nil {
					returnError = err
				}
				properties[propertyName] = array

			}
		case jsonparser.Object:
			// nested objects and geo-props and phonenumbers.
			//
			// we do not have the schema for nested object and cannot use the efficient jsonparser for them
			//  (we could for phonenumbers and geo-props but they are not worth the effort)
			// however this part is only called if
			// - one of the datatypes is present
			// - AND the user requests them

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Flatten nested arrays into supported shapes (arrays of primitives or objects) before import
  2. Replace null elements with a sentinel value or omit them from arrays
  3. Store nested-array data as a JSON string or in a nested object property instead

Example fix

// before
{"matrix": [[1,2],[3,4]]}
// after
{"matrix": [{"row": [1,2]}, {"row": [3,4]}]}
Defensive patterns

Strategy: validation

Validate before calling

func hasOnlySupportedArrayElements(arr []interface{}) bool {
    for _, el := range arr {
        switch el.(type) {
        case nil: // null and nested arrays unsupported
            return false
        case []interface{}:
            return false
        }
    }
    return true
}

Try / catch

if err != nil && strings.Contains(err.Error(), "unknown data type ArrayEach") {
    // reshape the property (flatten/nulls removed) and re-import
}

Prevention

When it happens

Trigger: Reading an object whose property is an array containing a nested array or a null element, e.g. {"tags": [["a","b"]] } or {"nums": [1, null, 2]}, when that property is requested in propertyPaths.

Common situations: Clients importing nested arrays (e.g. matrix data) or arrays with nulls into a property, then querying the property back; cross-language clients (e.g. JS sending null in arrays).

Related errors


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/2b4e72ad59950185. Report an issue: GitHub.