eaudeweb / percolator

Poor man's auto tagging based on exact matches, synonyms and common abbreviations
0 stars 0 forks source link

Support term hierarchy #17

Open melish opened 6 years ago

melish commented 6 years ago

and show all ancestors of each tag in the results

andrei-duhnea commented 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.