Closed csh97 closed 8 months ago
Awesome. I think you would also need the related queries and aggrgegation support to use this. But that can be done later with another PR if you feel up to it.
My current use case is just for create indices and insert data, so I dont need the queries right now. However, you are right it would be great if the library supported it. I'm happy to have a look at adding support for this though
Thanks for this. I'll merge this.
Add support for join field types in index mappings
See Elasticsearch documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/parent-join.html
The documentation has the following example of a simple join field:
With the added
JoinDefinition
andjoin()
you can now replicate this:This produces:
The only difference here is
question
is always a list even if there is only 1 value, as far as I'm aware this shouldn't be a problemThe documentation also has a slightly more complex example with multiple levels of relation:
This can also be replicated like so:
Which produces: