Elasticsearch deeper level Parent-child relationship (grandchild)

前端 未结 2 1708
故里飘歌
故里飘歌 2021-01-30 23:36

I need to index 3 levels (or more) of child-parent. For example, the levels might be an author, a book, and characters from that book.

However, when indexing more than t

2条回答
  •  日久生厌
    2021-01-31 00:26

    For the grandpa docs, you need to get the _id as the _routing. For the father docs, just use the _parent (grandpa._id) as the _routing. For the children docs, just use the grandpa._id as the _routing.

提交回复
热议问题