Multiple kernel type mappings for one field in elasticsearch (e.g. string and object)

Is it possible to create several mappings of the main type for one field, for example. Qty field that allows you to use both long / string values, and a field that allows you to use both object / string values?

I use the mongodb river, and as soon as the field is indexed as an object, does it throw a MapperParsingException for all other data that contains this field as a string?

I read here https://github.com/elasticsearch/elasticsearch/issues/1166 that this is not possible, is it persisting? I am using v 0.19.8.

I also tried setting ignore_conflicts: true in my mapping, as shown in the example http://grokbase.com/t/gg/elasticsearch/128ath8kh1/some-mapping-confusions-to-resolve , but the data I was looking for was not pulled in elasticsearch from mongodb.

I also looked at http://elasticsearch-users.115913.n3.nabble.com/Getting-MapperParsingException-while-parsing-a-string-and-a-number-td3897986.html , but I do not control the scheme (I cannot rename it field differently if other types are encountered)

I would like to make sure elasticsearch has all the documents that I saved in mongodb. Thanks!

+4
source share
1 answer

Is it possible to create several mappings of the main type for one field, for example. Qty field, which allows you to use both long / string values, and a field, which allows you to use both object / string values?

No, but you can see if you can use a multi-page file type to get where you are trying to go

0
source

Source: https://habr.com/ru/post/1483251/


All Articles