-
Notifications
You must be signed in to change notification settings - Fork 2
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
Restore previous sorting method #65
Comments
Had this discussion in slack, but putting here as well: Looking. back at v 1.2, I think that what happens is that the first query does some sorting, but it doesn't really matter because the second query is the one that goes at gets all the names for the curies found in query 1: Chris Bizon |
I’ve been looking in https://solr.apache.org/guide/7_6/function-queries.html and I don’t see a length function. I tried Googling for it and couldn’t find anything either (apart from ChatGPT which helpfully suggested the field_length() function that nobody else has heard of). I think you’re right that probably the best short-term solution is to reinstate the length field in Solr that we used to have previously. I’m going to call this shortest_name_length for now so it’s clear what it means, but I wonder if we should try to factor the information content value in here as well. I should be able to implement the shortest_name_length field in Babel pretty quickly, so I'll take back ownership of this ticket. |
This PR attempts to improve the search query issues we've been having by restoring the "sort by shortest synonym" rule as per #65 (comment). This required adding `shortest_name_length` to the Solr field configuration and to tests/data/test-synonyms.json. I haven't confirmed that this works as well as before, only that it seems to be working (I'll add those tests to the Babel Validator). It also improves the documentation of the endpoints, fixes the version of nameresolution-data-loading to `latest`, and update `preferred_name` to LowerTextField so we can search for it using the same features as we do on the `names` field. We also add `http://localhost:8080` as a server for development.
This has now been significantly improved with CURIE suffix sorting, and it's working well enough that is what is being used by Translator UI. Closing. |
May fix #50
Need to restore old sort from:
NameResolution/api/server.py
Lines 102 to 120 in 064d3a3
The text was updated successfully, but these errors were encountered: