Skip to content

Support allChildrenOf on /api/v2/entities #1180

@EliotRagueneau

Description

@EliotRagueneau

New feature description.
Would be great to support same options as /api/search inside /api/v2/entities, specially allChildrenOf.
Being able to filter the fields to retreve could be nice as well as most of the response are useless to me, could save a fair share of bandwidth

Use cases
This would allow to use auto-suggestions on a predefined subset of an ontology which is quite often useful in curation. Indeed /api/search works already, but it only returns a match if there is an exact token match, and doesn't support partial label match like /api/v2/entities does. An alternative would be to optionally allow partial matches in /api/search.

e.g. compare results of
live(r) on search
https://www.ebi.ac.uk/ols4/api/search?q=live&ontology=uberon&local=true&rows=10&queryFields=label
https://www.ebi.ac.uk/ols4/api/search?q=liver&ontology=uberon&local=true&rows=10&queryFields=label

live(r) on entities (much better results, but unable to filter for a specific branch)
https://www.ebi.ac.uk/ols4/api/v2/entities?search=live&ontologyId=uberon&isDefiningOntology=true&size=10
https://www.ebi.ac.uk/ols4/api/v2/entities?search=liver&ontologyId=uberon&isDefiningOntology=true&size=10

User communities
Would like to use it for biostudies users in our submission tool, so that they can easily add ontology terms from partial matches (auto-suggestions) while staying relevant on a specific topic

Describe the solution you'd like
If you are using Solr, then maybe if you exposed the fq parameters, we could filter to only get results having a specific node in their hierarchicalAncestors. Having a more explicit option could work too

Describe alternatives you've considered
I tried a bit using searchproperties but couldn't find what synthax is expected there, anf if accapeted filters

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions