elasticsearch - How do I index hierarchical data in elastic search? -
i have data similar file paths index in elasticsearch. (basically list of tokens separated delimiter)
ex data: a/b/c/d/e a/b/c/ a/m/n x/y/z
once index, should able query immediate children given token shown below.
for prefix of a, immediate children [b, m] prefix of x, immediate children [y] tokens @ root [a,x]
have considered parent-child relationship?
indexed such you'd able query following
{ "query": { "has_parent": { } } { "query": { "has_child": { } }
Comments
Post a Comment