Skip to content

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

@stefandesu

Description

@stefandesu

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

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