So far I have database with many to many relation. Tables is "lists" and "objects" where list contains many objects and objects could be in many lists. Now what I can not find is how to set such relations in Elasticsearch to get best results. I could use denormalized document, but then I will have problem with indexing. For example, if parent (List) is changed, all related objects in Elasticsearch have to be reindexed. And to do that php need to collect all object information from database and put them in Elasticsearch. So if list contains 100 000 objects it is slow and many times ends with memory or execution time limit exception. Requirement is to be searchable after data is changed in database.
I found that Elasticsearch has parent/child and allow update only parent data. But I can not find any solution for many to many relation and parent/child works only with one to many relation.
So what is best practice how to handle this situations? Any guidance would be appreciated.