Hi, I doing sync data to es 6.2 from postgres database and got some trouble modeling it. I have this situation:
3 models A, B, C
We want to search field from that 3 model and has result as model B look alike. Those are have relationship as A(1) - B(n), C(1) - B(n).
So if I have a text 'andy' from all 3 model the result would be:
- all result of B that has text 'andy',
- all result of B "belong to" A which has text 'andy'
- all result of B "belong to" C which has text 'andy'
How I should modeling my indices so that I can search and paginate the result?
Right now I model it as one index: A as parent, B as Child, C is stored nested in B. It work quite ok with inner hit query. It has some cons relate to concurrent sync data.
But I'm wonder if is there any better way to do this (and how to update docs data)