elastigo icon indicating copy to clipboard operation
elastigo copied to clipboard

wrong field name exception isn't being reported in BulkIndexer

Open oryband opened this issue 10 years ago • 3 comments

Let's say I have a mapping with a single field of type long

{"my-index": {
  "mappings": {
    "my-type": {
      "properties": {
        "field-1": {
          "type": "long"}}}}}}

If I try to index a document where field-1's value is a non-number string i.e. "hello" (can't be converted to a long), I will get an exception. This isn't reported to the error channel and should be.

oryband avatar Dec 21 '14 11:12 oryband

any progress on this?

oryband avatar Jan 29 '15 15:01 oryband

Hi @oryband, I have a full time job so the time I can spend on this project has limitations. Things that would make it easier for me to fix this would be a test case, or if you are feelin' it, you could attempt the fix yourself. I can't give you an ETA at the moment, I'm sorry.

mattbaird avatar Jan 29 '15 15:01 mattbaird

I've tracked down where the fix should be: https://github.com/mattbaird/elastigo/blob/09363f92cd44e47b5034719cdef78da73190d847/lib/corebulk.go#L333

Items is an objects of elasticsearch methods (create, index, etc.), where each method is a list of objects, where each of these has an error field. These should be reported to the standard error channel or some other designated channel.

See the official docs for more info: https://www.elastic.co/guide/en/elasticsearch/guide/master/bulk.html#CO16-3

Anybody care to help?

oryband avatar May 31 '15 13:05 oryband