Closed rmundel closed 3 years ago
I think the default config for the date mapping could be 'format' => 'yyyy-MM-dd HH:mm:ss'. Also, there is a way to report the elastic errors so that the Scout job fails?
Hey @rmundel, sorry for the late reply.
You should define the date format when creating an index. Currently, not all errors returned by ES result in an exception, I'm investigating it.
Hey man! Thanks for the work btw. So, after investigating a bit, I added some code inside the ES package and found out that indeed it was not returning exceptions, but the index was rejecting the data because ou some fields validations (I was sending the wrong date format). I think that the job should fail right?
I lost the errors log but was somthing like this:
Success log example:
[2021-02-19 10:17:06] production.DEBUG: {"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":0,"relation":"eq"},"max_score":null,"hits":[]}}
Failure log example:
[2021-02-19 10:17:06] production.DEBUG: {"took":0,"timed_out":false,"_shards":{"total":1,"successful":0,"skipped":0,"failed":1},"hits":{"total":{"value":0,"relation":"eq"},"max_score":null,"hits":[]}}
I think this issue should be in the scout driver repo right?
Thanks.
Maybe the ES Scout Driver could read the ES response and fail the job?
@rmundel, definitely. If there is an error, the document manager should throw an exception. Unfortunately, I didn't have time yet to look into it.
@rmundel I've created an issue in the official client repository, let's see how it goes. If it's not resolved in the client library, then I will add extra handling on the adapter level.
Hey @babenkoivan, no worries! Thanks for the effort.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
Hey, first of all, awesome work!
I'm playing around with the new elastic packages and I'm getting some issues trying to parse date fields with the follow config:
It reports a successfull job but debugging the underlying elastic request gives me the following output: