Open EdwardShen125 opened 2 years ago
I'm not sure there is a difference in Elasticsearch between an empty array and a missing field.
https://www.elastic.co/guide/en/elasticsearch/reference/current/array.html
An array may contain null values, which are either replaced by the configured null_value or skipped entirely. An empty array [] is treated as a missing field — a field with no values.
I could be wrong though.
Sorry, disregard my last comment. I thought this issue was in a different repository.
I just pushed a fix for this and will create a new release for it.
Sorry, disregard my last comment. I thought this issue was in a different repository.
I just pushed a fix for this and will create a new release for it.
that's great!
Mistakes happened when i migrates docs from one table to another. source doc like
{"A":[], "B":"name"}
result doc like{"B":"name"}
that A field was unset when param "a" of func "normalizeDocSlice" was a zero length slice that not nil pointer. So the returned var "avs" was a nil.i guess
var avs = make([]interface{}, 0)
may solve my problem