ElasticSearch: reusing a nested type mapping

I have an object with several properties of the same complex type that I want to index in ElastcSearch.

For instance:

Root {
  a : Foo
  b : Foo
  c : Foo
}

Foo {
  x : Bar
  y : Bar
  z : Bar
}

Bar {
   ...
}

etc.

where Rootis root, and Foo, Barare nested objects.

How to avoid duplicate nested type definitions for types Fooand Barin JSON file to display ElasticSearch?

+4
source share

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


All Articles