-
Notifications
You must be signed in to change notification settings - Fork 86
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
Converted hard-coded search results sort option "by relevance" to configuration individual. #431
Conversation
ac80a0b
to
a9c4cd8
Compare
a9c4cd8
to
e392833
Compare
…dual Apply first sort option none was specificly defined and if query text wasn't provided, which means that only facets were used
e392833
to
0c69553
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@litvinovg thanks for this. Couple of comments:
- when I am entering search page (from the home page, type some text and hit the button Search), the list of results is shown, it is ordered by relevance, but in the dropdown list it is "Sort by" (not "Sort by Relevance")
- should we make labels for other languages ? Meaning to create search_individuals_vitro.n3 and vitro_extended_search.ttl for other languages (with google translations for the beginning)
- also, we need a strategy when new set labels are grouped in a new file (vitro_extended_search.ttl), and when it is just added in vitro_UiLabel.ttl
Yes. "Sort by" is a label for the field, not a selected value. Sorting option that was used doesn't present as chosen in the list of sorting options. Until sorting option explicitly selected sorting type is decided by contents of search query: if any text provided, then sort by relevance; if no text was provided, then search by first sort option defined by the used. If sort option wasn't set explicitly it is not saved for the user to avoid situation when at first user selected some filters, got results sorted by first defined sorting option and sorting option is saved and then added some text. In that case sorting option saved on previous step would prevent user from getting results based on scores calculated from text query.
Yes. |
@chenejac Added translations for different languages. We need reviews from native speakers. |
home/src/main/resources/rdf/i18n/pt_BR/display/firsttime/search_individuals_vitro.n3
Outdated
Show resolved
Hide resolved
home/src/main/resources/rdf/i18n/de_DE/display/firsttime/search_individuals_vitro.n3
Outdated
Show resolved
Hide resolved
Co-authored-by: Benjamin Kampe <benjamin@fehrmanns.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@litvinovg I will post one comment in the VIVO PR linked with this PR. This looks ok to me.
I tested sorting after the discussion at the meeting. It seems to be working. |
Related VIVO PR
What does this pull request do?
Converted hard-coded search results sort option "by relevance" to configuration individual.
Without that there is no way to change order of sort options on search results page.
Apply first sort option if no query text was provided and no sort option was explicitly set.
Interested parties
@VIVO-project/vivo-committers