[ 
https://issues.apache.org/jira/browse/OAK-9665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nitin Gupta resolved OAK-9665.
------------------------------
    Fix Version/s: 1.44.0
       Resolution: Fixed

> Unparseable date property causes entire node to fail indexing
> -------------------------------------------------------------
>
>                 Key: OAK-9665
>                 URL: https://issues.apache.org/jira/browse/OAK-9665
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: elastic-search, indexing
>            Reporter: Thomas Mueller
>            Assignee: Nitin Gupta
>            Priority: Major
>             Fix For: 1.44.0
>
>
> If the index definition defines a property as a Date, but the value is not in 
> the appropriate Date format, then indexing will (partially) fail.
> The behaviour in this situation is different between Lucene and Elastic:
> * With a Lucene index, WARN [1] is logged but the rest is indexed.
> * With Elastic index, ERROR [2] is logged and no document is created.
> [1]
> {noformat}
> Ignoring ordered property. Could not convert property  ... of type STRING to 
> type DATE for path ... 
> java.lang.NullPointerException: null
>       at 
> org.apache.jackrabbit.oak.plugins.index.lucene.FieldFactory.dateToLong(FieldFactory.java:186)
>  [org.apache.jackrabbit.oak-lucene:1.8.24]
>       at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.addTypedOrderedFields(LuceneDocumentMaker.java:385)
>  [org.apache.jackrabbit.oak-lucene:1.8.24]
>       at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.access$100(LuceneDocumentMaker.java:67)
>  [org.apache.jackrabbit.oak-lucene:1.8.24]
>       at 
> org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker$1.onResult(LuceneDocumentMaker.java:590)
>  [org.apache.jackrabbit.oak-lucene:1.8.24]
>       at 
> org.apache.jackrabbit.oak.plugins.index.lucene.Aggregate$PropertyInclude.collectResults(Aggregate.java:396)
>  [org.apache.jackrabbit.oak-lucene:1.8.24]
> {noformat}
> [2]
> {noformat}
> 00:49:19.521 [I/O dispatcher 1] ERROR 
> o.a.j.o.p.i.e.i.ElasticBulkProcessorHandler - Failure Details: BulkItem ID: 
> ..., Failure Cause: {}
> org.elasticsearch.ElasticsearchException: Elasticsearch exception 
> [type=mapper_parsing_exception, reason=failed to parse field [...] of type 
> [date] in document with id '...'. Preview of field's value: '2021-09-01 
> 00:01']
>       at 
> org.elasticsearch.ElasticsearchException.innerFromXContent(ElasticsearchException.java:496)
>       at 
> org.elasticsearch.ElasticsearchException.fromXContent(ElasticsearchException.java:407)
>       at 
> org.elasticsearch.action.bulk.BulkItemResponse.fromXContent(BulkItemResponse.java:139)
>       at 
> org.elasticsearch.action.bulk.BulkResponse.fromXContent(BulkResponse.java:188)
>       at 
> org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1911)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to