aparo / pyes

Python connector for ElasticSearch - the pythonic way to use ElasticSearch
BSD 3-Clause "New" or "Revised" License
606 stars 269 forks source link

Array Field in mapping #388

Closed tarequeh closed 10 years ago

tarequeh commented 10 years ago

Apologies if I'm missing something obvious. From some online research and looking at the code I'm unable to determine how to create an Array Field and add boost, analyzed etc. properties for it using the mapping tools. I guess I can just create a new field inheriting the AbstractField but curious as to why it's not in the code.

aparo commented 10 years ago

In ES there is not difference from an array and a single value. Just declare the field and you can use it as single or multi values. http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-array-type.html#mapping-array-type

tarequeh commented 10 years ago

Thanks for the explanation @aparo. Makes sense.