Closed stefandesu closed 2 years ago
I used the same regex to truncate the label as is used in Cocoda.
I also think we should improve this at some point in the future, and even if behavior changes, it doesn't need to be a new major release even if it's technically a breaking change.
Currently, LabelSearchSuggestionProvider uses the full
prefLabel
to find concepts in the target scheme. However, if the label contains multiple things separated by commas, like DDC 612.6 "Fortpflanzung, Entwicklung, Reifung", there usually won't be any results.In Cocoda, when labels are inserted in the target search field, they are actually truncated using a certain heuristic, see here. Would it make sense to apply something similar here? We could also perform two search request for each direction, one with the full label (where the results are prioritized higher) and one with the truncated label. This would mean that one function call could actually be cause four API request because we need separate requests for both sides (if given).
@nichtich What do you think?