Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to search descriptors by label and order by relevance? #174

Open
stefandesu opened this issue Oct 6, 2021 · 1 comment
Open

Comments

@stefandesu
Copy link

Hi,

I've started using MeSH for our project (https://github.com/gbv/cocoda) and so far it's working great! Part of it is searching for a descriptor by label. Currently I'm using SPARQL with a regex filter; I've also tried the /lookup/descriptor endpoint. However, as far as I can see, neither allows me to order results by relevance. If I search for "infection" (to use the example given in the SPARQL editor), I would expect those descriptors where the label matches exactly or closely come first, then any other descriptors where the label includes "infection". That is given neither with SPARQL nor with Lookup. With SPARQL, it seems that the result order isn't even stable if I don't specify ORDER BY.

Is there any way to get search results ordered by relevant? Or do I need to request lots of results and do my own relevance sorting?

Thanks a lot!
Stefan

@danizen
Copy link
Contributor

danizen commented Oct 6, 2021

Not at this time, but we will discuss internally and get back to you. There is a development target to enhance the lookup API, and relevance would be a good addition. However, we have to decide if we have time to add relevance. It doesn't fit well with SPARQL but the lookup API doesn't need to be implemented with SPARQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants