research-software-directory / RSD-as-a-service

This repo contains the new RSD-as-a-service implementation
https://research.software
22 stars 15 forks source link

No match when searching exact title #1108

Closed cmeessen closed 5 months ago

cmeessen commented 5 months ago

In some cases, the search function does not return the correct results even though the user enters the exact software title.

Example from helmholtz.software:

image

This is the software entry that should appear: https://helmholtz.software/software/rce

ewan-escience commented 5 months ago

The search uses this endpoint: https://helmholtz.software/api/v1/rpc/global_search?search_text=ilike.*rce*&limit=30.

The problem is in the limit, because if you remove it, you do get the exact match back. We should somehow sort the results from the global search.

ewan-escience commented 5 months ago

This requires some refactoring of the global_search function, as it currently doesn't require an input parameter. We should probably require one, so we can assign scores to the output. Furthermore, we might have it return an error when the input is too short, e.g. when entering 2 or less characters.