Fix np created using#95
Merged
Merged
Conversation
…that as the title for "NP created using" legacy workaround
…ences, and refactor search-result label fix
…search), we cannot get the label of first introduced subject, as fallback for np title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A workaround to resolve the issue of older nanopubs created using templates that had no
hasNanopubLabelPatternspecified and fell back to usingNP created using...as the title.The best label in these cases, is to use the label of the first introduced subject. This workaround has been applied to:
TODO:
NP created usingfor some reason update: unfortunately this cannot be fixed in the query due to assertion graph being unavailable for the/textsearch endpointspubinfois automatically bound and that rebinding it ingraph:nparesults in it actually being unbound (check that the wording here is correct, perhaps ask Tobias). Also how certain things are not available in the full-text search endpoint (pubinfo?). Perhaps ask Tobias to lay out all those "privileged info" or maybe they are available somewhere (even just code).TODO (potential followups):
There is one small issue for which there is not a good workaround - if you see a title based on the "label of the first introduced subject" and try to search for it later by title, you will be confused as it wont show up in results. This is because its still searching within the title in the SPARQL query which is still going to be
NP created using.... The user would only find it if they change toFull-textsearch mode. Possible solutions:There are also likely other places where the label of a NP is shown. For example in comboboxes for certain creation templates where you search and select an NP to reference, and in the viewer for the same NP where the referenced NP is shown. It becomes a bit of a a "whackamole" at that point. For now I think the main issue of search result lists being confusing, has been resolved.
BEFORE
AFTER