Open melish opened 6 years ago
I experimented with modelling a species taxonomy with both the nested and parent-join mappings in ES. When using nested, the hit's siblings cannot be trimmed from the response document (and more worryingly nor can the ancestor's siblings). Parent-join allows a nicely normalized hierarchy model, but it has copious warning about multi-nesting performance, and requires 7 queries to reconstruct an ancestors chain.
If what we want to achieve is to simply present a given species' ancestors list, I think we should simply flatten the taxonomy and search by scientific name to get all ancestor taxa from the denormalized document.
and show all ancestors of each tag in the results