You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Angela Fabregues (Jira)" <ji...@apache.org> on 2022/01/18 08:55:00 UTC

[jira] [Commented] (OAK-9665) Unparseable date property causes entire node to fail indexing

    [ https://issues.apache.org/jira/browse/OAK-9665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477677#comment-17477677 ] 

Angela Fabregues commented on OAK-9665:
---------------------------------------

Hi [~thomasm] ,I need some help to understand the expected behaviour.

By "{_}With a Lucene index, WARN [1] is logged but +the rest+ is indexed{_}", do you mean (A) that the rest of the fields in the document are indexed? Or you are referring to (B) the rest of the documents that come after in the bulk indexing?

> 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
>            Priority: Major
>
> 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)