Skip to content
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

5207 dataverse facet #5697

Merged
merged 12 commits into from
Aug 9, 2019
Merged

Conversation

JayanthyChengan
Copy link
Contributor

@coveralls
Copy link

coveralls commented Mar 28, 2019

Coverage Status

Coverage decreased (-0.009%) to 19.488% when pulling fbae91b on scholarsportal:5207-dataverse-Facet into 271dbd0 on IQSS:develop.

…erse-Facet

# Conflicts:
#	src/main/java/Bundle_fr.properties
#	src/main/java/citation_fr.properties
previewCountbyType.put("dataverses", 0L);
previewCountbyType.put("datasets", 0L);
previewCountbyType.put("files", 0L);
previewCountbyType.put(BundleUtil.getStringFromBundle("dataverses"), 0L);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text isn't actually shown anywhere, correct? I don't think there's a need to localize it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scolapasta - This shows in the facets

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JayanthyChengan Sorry, what I meant to say is that the text isn't gotten from this previewCountbyType hashmap, as far as I can tell (in the xhtml, I see calls to "{bundle['dataverse.results.types.dataverses']}" and "{bundle['dataverse.results.types.datasets']}". If that's true, then we don't need to localize the internal keys to hashmaps like this.

(or am I missing something?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scolapasta - I replied for this comment to your email. Please let me know, if I need to forward the email again. Thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JayanthyChengan Can you go ahead and forward the e-mail again? I couldn't find the reference to this specific comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scolapasta - just forwarded the e-mail.

…erse-Facet

# Conflicts:
#	src/main/java/propertyFiles/Bundle.properties
@scolapasta
Copy link
Contributor

@JayanthyChengan Could you get the latest from develop and refresh this? I'm hoping to have some more feedback this afternoon.

…erse-Facet

# Conflicts:
#	src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java
@JayanthyChengan
Copy link
Contributor Author

@scolapasta - updated to latest develop code.

@scolapasta scolapasta removed their assignment Jul 19, 2019
@kcondon kcondon assigned kcondon and unassigned JayanthyChengan Jul 19, 2019
…erse-Facet

# Conflicts:
#	src/main/java/edu/harvard/iq/dataverse/search/SearchServiceBean.java
@kcondon
Copy link
Contributor

kcondon commented Jul 22, 2019

@JayanthyChengan I've deployed your code and retrieved the latest bundle files from the /develop branch of https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs . I had some trouble initially with deploying the war file if I had defined the language directory first -it could not find the default English bundle. So, I updated the language setting first, deployed your war file, then created the language directory jvm-option, uploaded the languages.zip file and restarted glassfish. The application functions and I'm able to switch between French and English and I see the facet labels display in French but I am seeing many server log errors. Is this a problem with the code or something I've done incorrectly in configuration or deployment? Thanks for any help.

Kevin

[2019-07-22T14:56:03.448-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=48 _ThreadName=jk-connector(1)] [timeMillis: 1563821763448] [levelValue: 900] [[
Could not find key "Public" in bundle file: ]]

[2019-07-22T14:56:03.453-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=48 _ThreadName=jk-connector(1)] [timeMillis: 1563821763453] [levelValue: 900] [[
Could not find key "Restricted" in bundle file: ]]

[2019-07-22T14:56:03.765-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=48 _ThreadName=jk-connector(1)] [timeMillis: 1563821763765] [levelValue: 900] [[
Could not find key "staticSearchFields.fileAccess" in bundle file: ]]

[2019-07-22T14:58:43.768-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821923768] [levelValue: 900] [[
Could not find key "Department" in bundle file: ]]

[2019-07-22T14:58:43.771-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821923771] [levelValue: 900] [[
Could not find key "Journal" in bundle file: ]]

[2019-07-22T14:58:43.775-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821923775] [levelValue: 900] [[
Could not find key "Laboratory" in bundle file: ]]

[2019-07-22T14:58:44.043-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821924043] [levelValue: 900] [[
Could not find key "staticSearchFields.dvCategory" in bundle file: ]]

[2019-07-22T14:58:44.046-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821924046] [levelValue: 900] [[
Could not find key "Root" in bundle file: ]]

[2019-07-22T14:58:44.309-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821924309] [levelValue: 900] [[
Could not find key "staticSearchFields.metadataSource" in bundle file: ]]

[2019-07-22T14:58:44.312-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821924312] [levelValue: 900] [[
Could not find key "2019" in bundle file: ]]

[2019-07-22T14:58:44.577-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821924577] [levelValue: 900] [[
Could not find key "staticSearchFields.publicationDate" in bundle file: ]]

[2019-07-22T14:58:44.639-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821924639] [levelValue: 900] [[
Could not find key "staticSearchFields.subject_ss" in bundle file: ]]

[2019-07-22T14:58:45.032-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821925032] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTypeGroupFacet" in bundle file: ]]

[2019-07-22T14:58:45.298-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821925298] [levelValue: 900] [[
Could not find key "staticSearchFields.dvObjectType" in bundle file: ]]

[2019-07-22T14:58:45.562-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821925562] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTag" in bundle file: ]]

[2019-07-22T14:58:45.822-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821925822] [levelValue: 900] [[
Could not find key "staticSearchFields.fileAccess" in bundle file: ]]

[2019-07-22T14:58:46.130-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926130] [levelValue: 900] [[
Could not find key "Department" in bundle file: ]]

[2019-07-22T14:58:46.133-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926133] [levelValue: 900] [[
Could not find key "Journal" in bundle file: ]]

[2019-07-22T14:58:46.136-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926136] [levelValue: 900] [[
Could not find key "Laboratory" in bundle file: ]]

[2019-07-22T14:58:46.399-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926399] [levelValue: 900] [[
Could not find key "staticSearchFields.dvCategory" in bundle file: ]]

[2019-07-22T14:58:46.402-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926402] [levelValue: 900] [[
Could not find key "Root" in bundle file: ]]

[2019-07-22T14:58:46.662-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926662] [levelValue: 900] [[
Could not find key "staticSearchFields.metadataSource" in bundle file: ]]

[2019-07-22T14:58:46.665-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926665] [levelValue: 900] [[
Could not find key "2019" in bundle file: ]]

[2019-07-22T14:58:46.926-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926926] [levelValue: 900] [[
Could not find key "staticSearchFields.publicationDate" in bundle file: ]]

[2019-07-22T14:58:46.991-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821926991] [levelValue: 900] [[
Could not find key "staticSearchFields.subject_ss" in bundle file: ]]

[2019-07-22T14:58:47.126-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927126] [levelValue: 900] [[
Could not find key "Tabular Data" in bundle file: ]]

[2019-07-22T14:58:47.129-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927129] [levelValue: 900] [[
Could not find key "Image" in bundle file: ]]

[2019-07-22T14:58:47.132-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927132] [levelValue: 900] [[
Could not find key "Text" in bundle file: ]]

[2019-07-22T14:58:47.392-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927392] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTypeGroupFacet" in bundle file: ]]

[2019-07-22T14:58:47.661-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927661] [levelValue: 900] [[
Could not find key "staticSearchFields.dvObjectType" in bundle file: ]]

[2019-07-22T14:58:47.924-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927924] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTag" in bundle file: ]]

[2019-07-22T14:58:47.927-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927927] [levelValue: 900] [[
Could not find key "Public" in bundle file: ]]

[2019-07-22T14:58:47.930-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821927930] [levelValue: 900] [[
Could not find key "Restricted" in bundle file: ]]

[2019-07-22T14:58:48.195-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563821928195] [levelValue: 900] [[
Could not find key "staticSearchFields.fileAccess" in bundle file: ]]

[2019-07-22T14:59:31.202-0400] [glassfish 4.1] [INFO] [] [edu.harvard.iq.dataverse.authorization.AuthenticationServiceBean] [tid: _ThreadID=50 _ThreadName=jk-connector(3)] [timeMillis: 1563821971202] [levelValue: 800] [[
no user found using [email protected]]]

[2019-07-22T14:59:32.243-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821972243] [levelValue: 900] [[
Could not find key "Department" in bundle file: ]]

[2019-07-22T14:59:32.246-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821972246] [levelValue: 900] [[
Could not find key "Journal" in bundle file: ]]

[2019-07-22T14:59:32.249-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821972249] [levelValue: 900] [[
Could not find key "Laboratory" in bundle file: ]]

[2019-07-22T14:59:32.511-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821972511] [levelValue: 900] [[
Could not find key "staticSearchFields.dvCategory" in bundle file: ]]

[2019-07-22T14:59:32.514-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821972514] [levelValue: 900] [[
Could not find key "Root" in bundle file: ]]

[2019-07-22T14:59:32.775-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821972775] [levelValue: 900] [[
Could not find key "staticSearchFields.metadataSource" in bundle file: ]]

[2019-07-22T14:59:32.779-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821972779] [levelValue: 900] [[
Could not find key "2019" in bundle file: ]]

[2019-07-22T14:59:33.036-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821973036] [levelValue: 900] [[
Could not find key "staticSearchFields.publicationDate" in bundle file: ]]

[2019-07-22T14:59:33.297-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821973297] [levelValue: 900] [[
Could not find key "staticSearchFields.publicationStatus" in bundle file: ]]

[2019-07-22T14:59:33.358-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821973358] [levelValue: 900] [[
Could not find key "staticSearchFields.subject_ss" in bundle file: ]]

[2019-07-22T14:59:33.746-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821973746] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTypeGroupFacet" in bundle file: ]]

[2019-07-22T14:59:34.009-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821974009] [levelValue: 900] [[
Could not find key "staticSearchFields.dvObjectType" in bundle file: ]]

[2019-07-22T14:59:34.499-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821974499] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTag" in bundle file: ]]

[2019-07-22T14:59:34.757-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821974757] [levelValue: 900] [[
Could not find key "staticSearchFields.fileAccess" in bundle file: ]]

[2019-07-22T14:59:35.085-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975085] [levelValue: 900] [[
Could not find key "Department" in bundle file: ]]

[2019-07-22T14:59:35.088-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975088] [levelValue: 900] [[
Could not find key "Journal" in bundle file: ]]

[2019-07-22T14:59:35.091-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975091] [levelValue: 900] [[
Could not find key "Laboratory" in bundle file: ]]

[2019-07-22T14:59:35.347-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975347] [levelValue: 900] [[
Could not find key "staticSearchFields.dvCategory" in bundle file: ]]

[2019-07-22T14:59:35.350-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975350] [levelValue: 900] [[
Could not find key "Root" in bundle file: ]]

[2019-07-22T14:59:35.606-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975606] [levelValue: 900] [[
Could not find key "staticSearchFields.metadataSource" in bundle file: ]]

[2019-07-22T14:59:35.609-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975609] [levelValue: 900] [[
Could not find key "2019" in bundle file: ]]

[2019-07-22T14:59:35.867-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821975867] [levelValue: 900] [[
Could not find key "staticSearchFields.publicationDate" in bundle file: ]]

[2019-07-22T14:59:36.132-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821976132] [levelValue: 900] [[
Could not find key "staticSearchFields.publicationStatus" in bundle file: ]]

[2019-07-22T14:59:36.193-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821976193] [levelValue: 900] [[
Could not find key "staticSearchFields.subject_ss" in bundle file: ]]

[2019-07-22T14:59:36.326-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821976326] [levelValue: 900] [[
Could not find key "Tabular Data" in bundle file: ]]

[2019-07-22T14:59:36.329-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821976329] [levelValue: 900] [[
Could not find key "Image" in bundle file: ]]

[2019-07-22T14:59:36.332-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821976332] [levelValue: 900] [[
Could not find key "Text" in bundle file: ]]

[2019-07-22T14:59:36.586-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821976586] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTypeGroupFacet" in bundle file: ]]

[2019-07-22T14:59:36.849-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821976849] [levelValue: 900] [[
Could not find key "staticSearchFields.dvObjectType" in bundle file: ]]

[2019-07-22T14:59:37.107-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821977107] [levelValue: 900] [[
Could not find key "staticSearchFields.fileTag" in bundle file: ]]

[2019-07-22T14:59:37.111-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821977111] [levelValue: 900] [[
Could not find key "Public" in bundle file: ]]

[2019-07-22T14:59:37.114-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821977114] [levelValue: 900] [[
Could not find key "Restricted" in bundle file: ]]

[2019-07-22T14:59:37.368-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=52 _ThreadName=jk-connector(5)] [timeMillis: 1563821977368] [levelValue: 900] [[
Could not find key "staticSearchFields.fileAccess" in bundle file: ]]

@JayanthyChengan
Copy link
Contributor Author

@kcondon : the exception are thrown due to missing property in bundle.properties.

Please use the property file submitted in this pull request
https://github.com/IQSS/dataverse/blob/0f438ae0de63cda2efe4755a8eb96aafef39caa6/src/main/java/propertyFiles/Bundle.properties

Let me know, if you still notice exceptions.

@kcondon
Copy link
Contributor

kcondon commented Jul 22, 2019

@JayanthyChengan
Summary of issues:

  1. There are warnings in the server log related to missing bundle file entries, see below
  2. Facets are written to the index using the strings of whichever language is defined at the moment of saving. This results in facets in multiple languages that are not translated when a language is selected. Should it instead always write the facet in the default language and then translate on display using the selected language? We can check with @scolapasta
  3. Not all facet category labels (bold titles under facets) are translated: Dataverse Category, Publication Year, Subject,
  4. Page load performance is very sluggish for this branch. I will try testing with multiple languages disabled.
  5. Last, what is the best way to test this? I was referring to the notes at the top of the ticket but now I'm thinking I should test the additions made to Bundle.properties. Does that make sense?
  6. @mheppler points out that as of 4.15.1, Code and Archive are two new file type facets and ZIP was removed. Also, audio and video file type facets appear not to have been added.

[2019-07-22T15:36:15.481-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563824175481] [levelValue: 900] [[
Could not find key "Root" in bundle file: ]]
[Kevin] Root is the main dataverse, I believe

[2019-07-22T15:36:15.802-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563824175802] [levelValue: 900] [[
Could not find key "2019" in bundle file: ]]
[Kevin] Not sure where 2019 is coming from but maybe deposit date? This is system generated

[2019-07-22T15:36:17.598-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563824177598] [levelValue: 900] [[
Could not find key "1. This is one" in bundle file: ]]
[Kevin] This is a file tag

[2019-07-22T15:36:17.603-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563824177603] [levelValue: 900] [[
Could not find key "2. This is two" in bundle file: ]]
[Kevin] This is a file tag

[2019-07-22T15:36:17.609-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563824177609] [levelValue: 900] [[
Could not find key "3. This is three" in bundle file: ]]
[Kevin] This is a file tag

[2019-07-22T15:36:17.619-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=49 _ThreadName=jk-connector(2)] [timeMillis: 1563824177619] [levelValue: 900] [[
Could not find key "Documentation" in bundle file: ]]
[Kevin] This is a file tag

And, now that I've changed a dataverse type when French was selected, I'm seeing this in the logs:
[2019-07-22T15:49:39.760-0400] [glassfish 4.1] [WARNING] [] [edu.harvard.iq.dataverse.util.BundleUtil] [tid: _ThreadID=50 _ThreadName=jk-connector(3)] [timeMillis: 1563824979760] [levelValue: 900] [[
Could not find key "Département" in bundle file: ]]
[Kevin] This is a dataverse category in french

@pdurbin
Copy link
Member

pdurbin commented Jul 26, 2019

Field[] staticSearchFields = searchFieldsObject.getClass().getDeclaredFields();

@JayanthyChengan ah yes, I remember writing this Javadoc comment above the code you found:

"todo: refactor SearchFields to a hashmap (or something? put in database? internationalize?) to avoid the crazy reflection and string manipulation below"

Are you removing the need for that crazy reflection? Will be be able to delete that reflection code? At the time I was advocating a bit for storing more search fields in the database, mostly because I thought working on "Don't Hardcode Any Facets" at #2039 would be nice to do some day. Right now you can only adjust the order of the dynamic, database-driven metadata block facets.

@JayanthyChengan
Copy link
Contributor Author

@pdurbin - I don't intend on working on #2039, but even if I attempt to do it, I am not very clear with the complete scope or logic associated with searchfields and database. Sorry!

@scolapasta
Copy link
Contributor

@JayanthyChengan let's leave #2039 out of scope for this. I think what is being said is that all these static search fields are not facetable, so don't need to be localized. Let's remove the ones that are not facets (because we'll never going to add a facet on something like "identifier" or "file name"). You should be able to determine from the code which ones are facets, but let me/us know if you want help determining that.

The other thing that was being seen about the entries in the log file - it seems (and again @kcondon feel free to correct or add info) that the code is attempting to localize all of the facets and not just for those that are controlled vocabulary. For the ones that are not, the values are user entered so will usually not be found in bundles? I think we decided that user entered values were out of scope for this issue, so if that's the case, can you look at the code and make sure this is only for facet category labels, and for facet values that come from either controlled vocab or enums in the code?

@pdurbin
Copy link
Member

pdurbin commented Jul 26, 2019

@JayanthyChengan no problem. I was just telling @kcondon that I like what you've done in this pull request, how you're pulling strings like "Dataverse Category" out of the bundle instead of my old crazy way of transforming DATAVERSE_CATEGORY to the a friendlier string by replacing the underscore with a space and by changing it from upper case. It looks like we still need the reflection to get a list of fields that are declared in SearchFields.java. I still think that some day these should probably go in the database somewhere. Some day. Not today, not for this pull request. 😄

@JayanthyChengan
Copy link
Contributor Author

@scolapasta

  1. To remove staticsearchfields that are not facetable from bundle
    I looked at the code IndexServiceBean.java and planning to add only fields that are used in IndexServiceBean.java into bundle.properties, hoping those are the Facetable fields.
    But found SearchFields.IDENTIFIER , SearchFields.FILE_NAME - are those facetable?

  2. Yes, we are not localizing the user entered values. Added try/catch to handle exception.

mhvezina added a commit to BibNumUMontreal/dataverse-language-packs that referenced this pull request Jul 30, 2019
mhvezina added a commit to BibNumUMontreal/dataverse-language-packs that referenced this pull request Jul 30, 2019
@pdurbin
Copy link
Member

pdurbin commented Aug 6, 2019

But found SearchFields.IDENTIFIER , SearchFields.FILE_NAME - are those facetable?

@JayanthyChengan no, neither of these fields are facetable.

Generally, unique values don't make good facets. For example, every dataset description is different. Facets are best when then accumulate the same value such as the same dataset author.

@JayanthyChengan
Copy link
Contributor Author

Thanks @pdurbin . As @scolapasta mentioned in the last comment, I added only the staticSearchFields that are used for facets into bundle.properties ( referred solrQuery.addFacetField() statements from SearchServiceBean.java ) , please let me know if I am missing any static fields that are facetable. Thanks

@pdurbin
Copy link
Member

pdurbin commented Aug 6, 2019

@JayanthyChengan does that mean you're ready for me to drag this back to code review?

@JayanthyChengan
Copy link
Contributor Author

@pdurbin - yes, please move it to code review/ . Thanks

@sekmiller sekmiller removed their assignment Aug 9, 2019
@djbrooke djbrooke assigned scolapasta and pdurbin and unassigned scolapasta Aug 9, 2019
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fbae91b @JayanthyChengan seems to have removed from the bundle fields that don't need to be translated because they never appear on facets. This is a win for translators.

I'm approving this pull request but at standup @kcondon mentioned there may have been a second thing to fix but from a quick look around this pull request and the issue I couldn't find it. There was something about a try/catch for user entered values but @JayanthyChengan said she already added it.

@pdurbin pdurbin removed their assignment Aug 9, 2019
@kcondon kcondon merged commit 2d0c90c into IQSS:develop Aug 9, 2019
@kcondon kcondon self-assigned this Aug 9, 2019
@djbrooke djbrooke added this to the 4.16 milestone Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants