Thank you so much Brian for all your efforts.
The first time indexing of data containing unicode characters work
perfectly fine for us.
We are able to index data and query it without any issues.
The issue occurs when we are trying to update data. Strange thing is we are
using the same routine to convert our data in JSON, both, for first time
indexing and for update.
You seem to be right in saying that issue is with setScript method.
For now we have added one more step to convert unicode to characters(like \u003
to <) and then pass it on to setScript for update
The updated content gets posted without any issue.
Thanks,
Preeti
On Thursday, April 3, 2014 6:13:51 PM UTC+5:30, Preeti Jain wrote:
>
> Hi,
>
> We are using elasticsearch version 1.0.1
> For updating one of the ES docs, following script is being passed to
> updaterequestbuilder via setScript method.
>
> ctx._source.operation= {
> "operationID": 290,
> "opsThreatLevel": "Low",
> "opsName": "OPERATION_SIN",
> "opsStartDate": "2014-04-01T00:00:00",
> "opsRefNumber": "10245678",
> "opsEndDate": "2014-04-23T00:00:00",
> "opsDescription": "\u003cp\u003eFake Operation\u003c/p\u003e",
> "opsComments": "\u003cp\u003efake clues\u003c/p\u003e",
> "dateCreated": "2014-04-02T00:00:00"
> }
>
> When the update request gets executed we get following exception
>
> Exception in thread "main"
> org.elasticsearch.ElasticsearchIllegalArgumentException: failed to execute
> script
> at
> org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:153)
> at
> org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:80)
> at
> org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:189)
> at
> org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:185)
> at
> org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:64)
> at
> org.elasticsearch.action.support.single.instance.TransportInstanceSingleOperationAction$AsyncSingleAction$1.run(TransportInstanceSingleOperationAction.java:192)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: [Error: illegal unicode escape sequence]
> [Near : {... Description": "\u003cp\u003eFake Operation\u003c/p ....}]
>
> The unicode characters are not getting recognized. How to resolve this??
>
> Regards,
>
> Preeti
>
>
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/4cd5fc57-3dee-4e98-ba4b-a6a1dc884c01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.