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
Issue/vivo 3606 : add language-specific sorting and label fields to search index #321
Conversation
…ale-specific sort fields when available.
…s used which doesn't have lowercase filter
...vitro/webapp/searchindex/documentBuilding/SelectQueryDocumentModifierDynamicTargetField.java
Outdated
Show resolved
Hide resolved
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 can you please read my comments before we merge your PR. Great contribution!!!
api/src/main/java/edu/cornell/mannlib/vitro/webapp/search/VitroSearchTermNames.java
Outdated
Show resolved
Hide resolved
...in/java/edu/cornell/mannlib/vitro/webapp/controller/freemarker/IndividualListController.java
Outdated
Show resolved
Hide resolved
api/src/main/java/edu/cornell/mannlib/vitro/webapp/searchengine/base/BaseSearchQuery.java
Outdated
Show resolved
Hide resolved
…int page, int pageSize, String alpha, VitroRequest vreq)
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.
Thanks for the contribution.
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.
I tested these changes and they worked in my development environment. Individuals appeared on the expected index pages dependent on the selected language. Autocompleter was also aware of different languages and multiple labels. Tested with provided sample data as well as some own examples.
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.
Looks good to me.
…earch index (#321) * Add select query document modifier with dynamic target field; use locale-specific sort fields when available. * Add i18nized labels to index for autocomplete * Remove lowercasing from label query * Improved document modifier for multilingual field with defined suffix name * Improved document modifier for multilingual field with defined suffix name * refact: reverted access modifier changes * Lowercase label in documentModifierI18nSort in case old solr schema is used which doesn't have lowercase filter * fix: fixed queries and locale names * fix: renamed new document modifier * fix: use linkedHashMap to retain map sort fields order * refact: extracted buildAndExecuteVClassQuery(List<String> classUris, int page, int pageSize, String alpha, VitroRequest vreq) * fix: removed unused import * fix: constant name aligned with other suffix Co-authored-by: Brian Lowe <brian@ontocale.com>
Issue VIVO-3606:
This PR is a successor of this PR
VIVO-Solr PR (companion PR, but it still works without it )
What does this pull request do?
Note that this approach is intended only to enable the minimum sorting / autocomplete functionality needed by production i18nized sites. It has the following key limitations:
What's new?
How should this be tested?
Interested parties
@VIVO-project/vivo-committers
sorttest.n3.txt
sorttest_2.n3.txt