Project

General

Profile

Feature #4039

Update ResolveSolrField to pull metacat properties for running as MN

Added by Skye Roseboom over 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
d1_indexer
Target version:
Start date:
2013-10-04
Due date:
2014-04-12
% Done:

100%

Milestone:
None
Product Version:
*
Story Points:
Sprint:

Description

D1 index processing has been integrated into metacat MN stack as as search provider.

This class assumes CN operations:
-using /etc/dataone/node.properties to configure the hostname part of the resolve URL
-using 'cn' in the resolve url as part of the rest api (hostname/cn/v1/resolve/pid)

Possible to refactor the class to optionally look for hostname and cn/mn from metacat configuration if dataone configuration file is not available. This would allow the ResolveSolrField to operate in both a CN and MN metacat environment.

Matt mentioned metacat.properties as a source for this information:
{metacat web app context}/WEB-INF/metacat.properties
it contains properties:
server.name
dataone.nodeType
May also need base url info to append to host name before the /mn/v1/resolve/ path part?

In the search index - the 'dataUrl' and 'fileID' fields are filled by this class.

History

#1 Updated by Skye Roseboom over 10 years ago

  • translation missing: en.field_remaining_hours set to 0.0
  • Due date set to 2013-10-26
  • Tracker changed from Task to Feature

#2 Updated by Skye Roseboom over 10 years ago

  • Description updated (diff)

#3 Updated by Skye Roseboom over 10 years ago

  • Description updated (diff)

#4 Updated by Skye Roseboom over 10 years ago

  • Assignee changed from Skye Roseboom to Ben Leinfelder

Ben, can you document the desired content for these fields ('dataUrl' and 'fileID')? Sounded like maybe they should just stay empty? If there are more properties to be pulled from metacat.properties than listed above - could you document the name of each property? Thanks!

#5 Updated by Ben Leinfelder over 10 years ago

If not blank, then I think the safest thing is to use this url for both fields:
://[:port]//d1//v1/object/{pid}

relevant metacat.properties:

server.name=localhost
server.httpPort=80
server.httpSSLPort=443
application.context=metacat
dataone.nodeType=mn

Unfortunately, selecting the protocol right now in Metacat is somewhat convoluted - if server.httpPort is set to 443, then https is used. I'd much rather there were a server.protocol property. Some day.

#6 Updated by Chris Jones over 10 years ago

  • Target version changed from 2013.42-Block.5.4 to 2014.2-Block.1.1
  • Due date changed from 2013-10-26 to 2014-01-18

#7 Updated by Chris Jones about 10 years ago

  • Due date changed from 2014-01-18 to 2014-03-29
  • Target version changed from 2014.2-Block.1.1 to 2014.12-Block.2.2
  • Assignee changed from Ben Leinfelder to Jing Tao

#8 Updated by Skye Roseboom about 10 years ago

Could be implemented as a seperate 'metacat' specific implementation class for the resolve solr field. Does not necessarily need to live in the d1 code base. Runtime class is specified in the index related spring application context configuration - where this class could be specified over the dataone version of resolve.

#9 Updated by Jing Tao about 10 years ago

  • Due date changed from 2014-03-29 to 2014-04-12
  • Target version changed from 2014.12-Block.2.2 to 2014.14-Block.2.3

#10 Updated by Jing Tao about 10 years ago

I talked with Skye. He said the reason he wrote the bug is he saw the field in the Metacat MN solr index is not correct (pointing to cn). The only field which use the ResolveSolrField classin metacat-solr index is eml.fileID. The field is not used by any clients. And if the metacat mn deployment is changed (e. g., different host name or different context name), the eml.fileID, which is a direct url, should be reindexed. So i am thinking just remove the eml.fileID from the application-context-eml-base.xml.

#11 Updated by Jing Tao about 10 years ago

  • Status changed from New to Closed

Removed the eml.fileID from the application-context-eml-base.xml in metacat-index project.

#12 Updated by Jing Tao about 10 years ago

  • Status changed from Closed to In Progress

We only removed the fileID. but the dataUrl is defined in the application-context-systemmeta100.xml in d1_cn_index_processor.

#13 Updated by Jing Tao almost 10 years ago

  • Status changed from In Progress to Closed

I copied application-context-systemmeta100.xml from the d1_cn_index_processor to the metacat-index and also removed the bean for the dataUrl.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)