-
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
[AutocompleteWidget] Some MeSH IRIs cannot be preselected #220
Comments
The problem lies in the AutocompleteWidget code. The Another issue we face when moving from the OLS3 to the OLS4 backend: The OLS4 search API doesn't support searching for an IRI as a search term anymore. This drawback should be reported to the OLS4 repo. Both problems could be solved by not searching for the preselected IRI, but retrieving the metadata information directly via the OLS Term API. I'll be testing this in the next few days. |
How can we fix this in the short term? This breaks the edit functionally of our portal more or less. |
Would it be possible to display the label as a fallback value if both a IRI and a label are provided and the IRI resolving fails? I think that might be a good short term fix.
Sounds good 👍 |
This needs to be a high priority as the keyword editing functionality of existing resources on the Studyhub production instance doesn't work! The small problem turned out to be a big one:
Ideas for a fix:
I would suggest implementing the label fallback solution as a short term OLS3 fix to restore functionality for the NFDI4Health Studyhub and because it can last as a fallback solution. @vera would the effort on your part be okay? Regarding the OLS4 issue - the best solution would be a quick fix from the OLS team to allow an IRI as a search term again - as it is possible in OLS3. If they fix it, we can easily adapt the Studyhub specific gateway to map the NLM IRI and Bioportal IRI in both directions. Any other ideas? @rombaum @Pooya-Oladazimi Since we planned to replace the OLS3 with the OLS4 backend for the Health Studyhub and Terminology Service in the next days, we should discuss this again. |
I think using IRI as the search term does not make sense and that's the reason ols4 stopped using it (why do you search if you already have an IRI?). Instead, the thing you suggested already i.e. using entity endpoint in ols4 would be the solution. So we use the entity endpoint. If it returns 404, then the term does not exist anyway and we fall back to the label if it exists. the challenge is that we need to implement two different mechanism for ols4 and ols3 since ols3 does not have any entity endpoint. I do not see any simple solution for this. |
Yes, this would work for us as a short term fix, we already store and pass the labels to the |
Thanks for your comment @Pooya-Oladazimi , that makes it clearer. You're right, searching by IRI doesn't make sense. If we migrate the terminology service backend for the Studyhub to OLS4, the OLS3 implementation in the AutocompleteWidget works fine as it is, as long as nobody is using our MeSH resource in an OLS3 backend system (don't now any other use case and for future use cases OLS4 will be preferred and the mapping task must be handled by the any gateway). So we would just need to add the OLS4 entity endpoint integration and add the |
I would disagree in this point. We directly see in this issue (thankfully open by @vera) why this make sense. Or in other words since OLS3 didn't supported an endpoint for entities it was possible to get the requested information via the Nevertheless to solve this situation I would suggest that we should use in the case of setting the flag |
the way I see it is one of these two scenarios:
If we want to argue that ols4 v1 has to be backward compatible and support iri search, yes then an issue needs to be created. |
@Pooya-Oladazimi you're right with the two scenarios but you didn't need the ontology id (like |
done: EBISPOT/ols4#859 |
quick fix. Requires the property allowCustomTerms and no detail informations are shown. Full fix is ongoing. related to #220
## [4.3.1](v4.3.0...v4.3.1) (2025-02-26) ### Bug Fixes * **autocomplete:** use label for preselect if IRI not resolvable ([9220b00](9220b00)), closes [#220](#220)
We currently have a bug related to some mesh IRIs not being properly preselected in the AutocompleteWidget (https://github.com/nfdi4health/csh-ui/issues/1177).
To reproduce, for example, set
preselected
to[{ iri: "http://id.nlm.nih.gov/mesh/D016019" }]
.(e.g. here https://ts4nfdi.github.io/terminology-service-suite/comp/latest/?path=/story/react_search-autocompletewidget--with-value)
You will see that the AutocompleteWidget remains empty.
However, https://semanticlookup.zbmed.de/api/terms?iri=http://id.nlm.nih.gov/mesh/D016019 resolves to the term ("Survival Analysis").
And, for example, the other widgets can also display the term + associated info when given this IRI:
The text was updated successfully, but these errors were encountered: