2
votes

I want to use elasticsearch to build video information indices. there is a field "tagIds" that is a array like ["football", "basket ball"] field properties defined as

                                    .startObject(VideoRecDoc.Field.TAGID.getName()).field("type", "array").field("index", "not_analyzed").endObject()

and IDEA gives a exception

MapperParsingException[No handler for type [array] declared on field [tagIds]

My es version is 2.3.3, and i checked the es2.3.3 doc, it support array datatype.

when i chance tagIds field type from array to string, the index can be create successfully.

I google this exception, found nothing about that.

1

1 Answers

4
votes

you do not need to configure array as an own datatype in Elasticsearch. Every type like string, integer, etc can just accept a single or multi values.

Side note: Please update your elasticsearch as soon as possible, your version is pretty outdated, you should go with 5 for a free performance and stability boost.