samvera / hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
http://hyrax.samvera.org/
Apache License 2.0
184 stars 124 forks source link

Index full place name from geonames #1065

Closed jcoyne closed 2 years ago

jcoyne commented 7 years ago

When I choose "Sheffield, South Yorkshire, United Kingdom" and it's indexed as 'Sheffield' ... and ditto for "Sheffield, Tasmania, Australia"

screen shot 2017-05-26 at 10 24 16 am
no-reply commented 6 years ago

Was this closed in #1956?

rjkati commented 3 years ago

This issue is still present in Hyrax 3.0.2. When I add location metadata via geonames, only the first part of the name appears.

Example: https://nurax-dev.curationexperts.com/concern/generic_works/6395w720f?locale=en The Location metadata should be "Chapel Hill, North Carolina, United States" and "Durham, North Carolina, United States". However, the work show page displays "Chapel Hill" and "Durham". geonames

jeremyf commented 3 years ago

This work was in the valkyrie branch but never merged into main. PR #1956 includes the SHA 79a19df136bd85ce2b0f283718fba5bf79c6303d. When I check which branches contains the SHA I get the following:

❯ git branch --contains 79a19df136bd85ce2b0f283718fba5bf79c6303d
error: no such commit 79a19df136bd85ce2b0f283718fba5bf79c6303d

So, yes, the PR resolved it, but we never got this into main. I'm exploring now.

jeremyf commented 3 years ago

I'm reviewing the current implementation, and it varies significantly from the non-merged commit (aka 79a19df136bd85ce2b0f283718fba5bf79c6303d).

I am updating the existing spec to highlight that the gn:countryCode node is not used. Here's the spec:

https://github.com/samvera/hyrax/blob/05d576b43572511a62d00bcf14c9ae330d047fa0/spec/indexers/hyrax/generic_work_indexer_spec.rb#L101-L125

When I look at the https://www.geonames.org/5037649/about.rdf URL, there's no state code, just country code. Which we know to be inadequate. However, changes introduced in #1956 are breaking changes (updating the generator and removing constants), so I can't use them directly. I'll be bringing this up during stand-up.

For now, I'm going to work on getting a local test suite up and running so I can verify what I already have.