Currently, the biolink-api endpoint /search/entity/{term} returns just taxon labels in the facet_counts. taxon_label subkey, but other endpoints' filtering arguments require taxon IDs, not labels. Because of this, the Monarch frontend requires a map from taxon label to taxon ID, but ideally this data would come from the backend.
This PR adds an optional, but by default enabled facet to the results of ontobio.golr.GolrSearchQuery, specifically a subkey called _taxon_map with the following form:
Currently, the biolink-api endpoint
/search/entity/{term}
returns just taxon labels in thefacet_counts. taxon_label
subkey, but other endpoints' filtering arguments require taxon IDs, not labels. Because of this, the Monarch frontend requires a map from taxon label to taxon ID, but ideally this data would come from the backend.This PR adds an optional, but by default enabled facet to the results of
ontobio.golr.GolrSearchQuery
, specifically a subkey called_taxon_map
with the following form:The extra facet can be disabled by passing
taxon_map=False
toontobio.golr.GolrSearchQuery
's constructor.Addresses https://github.com/biolink/biolink-api/issues/386.