erlexec
erlexec copied to clipboard
feat: add root_id
trafficstars
Goals:*
This adds .root_id to Document.
.root_id is similar to .parent_id, but points all the way to the top, instead of just one chunk-level above.
This is particularly useful in combination with secondary indices, to tie a search back to the top-level document:
best_match = da.find(query=..., secondary_index='@ccc'][0] # best_match is a chunk of a chunk of a chunk
match_top_level = da[best_match.root_id] # get top level document
Caution this is a breaking change, since it changed the protobuf definition