Mapping Relationship Dynamically in ES 6.0

Hi All ,

I am looking for best solution to map parent-child (one to many) dynamically in ElasticSearch .

I tried with join query , Parent Query ID , Bucket Aggregation but wish to avoid reindex and need the flexibility of adding relationship on the fly .

Request you to share best proven method known .


The _parent field was removed in favor of join as noted here:

thanks a lot for your response .

Parent-join restrictions

It is possible to add a new relation to an existing join field.

does above action demand reindex ?

I'm not sure offhand but that should be easy to test. I have updated mappings and templates before without reindex and subsequent records applied new settings. Try and the response messages will tell you if you can or cannot :wink:

1 Like

Basically, I wish to achieve below use case . Thanks a lot for your valuable inputs

Need the ability to create new metadata on top of Elastic documents without having to re-index. The latter is a veeeery slow operation given the amount of data
The metadata needs to be available for joins. Assume I have ingested documents of type Doc with a field name
i. I can create a metadata called Altin, which has a score. I can then do select all Doc d, where d. name=’Joe’ and metadata’Altin’ and and m.score>9

                                                         ii.      I can create a metadata called Vassil which has a color. I can then do select all Doc d, where d. name=’Joe’ and metadata’Vassil’ and m.color=’red’

                                                       iii.      And I can combine select all Doc d, where d. name=’Joe’ and metadata m,’Vassil’ and m.color=’red’ and m.score=3

@dakrone @darkmoon @Akhilesh-Tiwari

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.