NCEAS / metadig-engine

MetaDig Engine: multi-dialect metadata assessment engine
7 stars 5 forks source link

Solr `dateUploaded` field doesn't index with Solr 7.5 #222

Closed gothub closed 2 years ago

gothub commented 5 years ago

The field dateUploaded is not added to the Solr index when the Solr version is upgraded to 7.5.0. This happens silently (at least at the debug level set to INFO).

The current workaround is to set <luceneMatchVersion>7.3.0</luceneMatchVersion> in /var/solr/data/quality/solrConfig.xml. The currently installed Solr version is 7.5.0.

Here is the Spring bean for this indexed field:

    <bean id="mdq.dateUploaded" class="org.dataone.cn.indexer.parser.SolrField">
        <constructor-arg name="name" value="dateUploaded"/>
        <constructor-arg name="xpath"
                         value="normalize-space(/*/sysmeta/dateUploaded)"/>
        <property name="multivalue" value="false"/>
        <property name="converter" ref="dateConverter"/>
    </bean>

It could be that the input (to indexing) date field is an unknown format to the SolrField and must be reformatted. This should happen before the field is written out to the quality report (check ./model/SysmetaModel.sm)

gothub commented 2 years ago

This problem is resolved with Solr 8.11.1