Closed ansell closed 5 years ago
occurrence_year
does not appear to be declared as multivalued in the solr schema of either the latest or the second latest solr collections:
http://localhost:8983/solr/biocache-2019-01-17-10-10/schema/fields?wt=json
{"name":"occurrence_year","type":"tdate","multiValued":false,"indexed":true,"stored":true}
After upgrade our biocache-store
to 2.4.2
we suffered this bug. So we did a re-index using biocache-store 2.4.3
with some similar error in biocache-service
:
Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Integer field au.org.ala.biocache.dto.OccurrenceIndex.year to java.lang.String.
(...)
Caused by: org.apache.solr.client.solrj.beans.BindingException: Exception while setting value : 1987 on java.lang.Integer au.org.ala.biocache.dto.OccurrenceIndex.year
at org.apache.solr.client.solrj.beans.DocumentObjectBinder$DocField.set(DocumentObjectBinder.java:455)
at org.apache.solr.client.solrj.beans.DocumentObjectBinder$DocField.inject(DocumentObjectBinder.java:438)
at org.apache.solr.client.solrj.beans.DocumentObjectBinder.getBean(DocumentObjectBinder.java:67)
So now I'm trying to re-index with biocache-store 2.4.1
.
Meanwhile I have tried several biocache-service
versions 2.1.{11,13,14,15,16-SNAPSHOT} with same results. Our sorl
(6.6.5
) & cassandra
(3.11.3
) are also up-to-date.
Any recommendation on compatible versions? By the way, I'm trying to update this: https://github.com/AtlasOfLivingAustralia/documentation/wiki/Components-versioning
PS: crossposting from slack channel
Solr indexes generated with
biocache-store-2.4.2
appear to be able to create multivalued fields foroccurrenceYear
. It isn't clear whyoccurrenceYear
would suddenly be converted to multivalued, but given the indexing is based on code and not configuration driven, it may have always been that way and was being optimised down to a scalar in the past before a fix to date parsing was made.This creates the following issue when attempting to deserialise a results document from Solr using the hardcoded Scala object model:
Because of this issue, we had to manually rollback to a previous index. The index causing the issue has been hardlinked from biocache-ws-test to debug the issue, and can be replicated using:
https://biocache-ws-test.ala.org.au/ws/occurrences/search?taxa=wombat
The error message from that resource:
matches the underlying biocache-service log message: