Problem with mapping

Hey, folks! How are you?

I'm having some troubles with, I believe, mapping. I have a JsonElement field type that is not being saved in my elastic. I'm using C#, working with NEST client.

Invalid NEST response built from a successful (200) low level call on POST: /transactions/_bulk?pretty=true&error_trace=true
# Invalid Bulk items:
  operation[0]: index returned 201 _index: transactions _type:  _id: b260dfdb-6610-4b43-a401-406d3cdc4b55 _version: 1 error: 
# Audit trail of this API call:
 - [1] HealthyResponse: Node: http://localhost:9200/ Took: 00:00:02.6124975
# Request:
{"index":{"_id":"b260dfdb-6610-4b43-a401-406d3cdc4b55"}}
{"chargeId":"3c8fe6ed-fab5-445a-8b85-61bad3b88efb","status":"Rejected","updatedAt":"0001-01-01T00:00:00","externalPart":{"name":"Valentina","document":"673.596.828-00"},"value":{"original":"720.32","updated":"720.32"},"events":[{"transactionId":"b260dfdb-6610-4b43-a401-406d3cdc4b55","internalTransactionId":"2eb56d3c-a7a0-413e-8b63-3473e1f2350e","externalId":"3c8fe6ed-fab5-445a-8b85-61bad3b88efb","status":"Rejected","type":"TransactionCreated","metadata":{"valueKind":3},"processedAt":"2023-04-03T14:46:28.8144858-03:00"}],"account":{"id":"00000000-0000-0000-0000-000000000000"},"expose":false,"id":"b260dfdb-6610-4b43-a401-406d3cdc4b55"}

# Response:
{
  "took" : 19,
  "errors" : false,
  "items" : [
    {
      "index" : {
        "_index" : "transactions",
        "_id" : "b260dfdb-6610-4b43-a401-406d3cdc4b55",
        "_version" : 1,
        "result" : "created",
        "_shards" : {
          "total" : 2,
          "successful" : 1,
          "failed" : 0
        },
        "_seq_no" : 7,
        "_primary_term" : 2,
        "status" : 201
      }
    }
  ]
}

# TCP states:
  Established: 38
  TimeWait: 52

# ThreadPool statistics:
  Worker: 
    Busy: 1
    Free: 32766
    Min: 8
    Max: 32767
  IOCP: 
    Busy: 1
    Free: 999
    Min: 8
    Max: 1000

When I insert the same metadata field through console, the transaction works, but when I do via code, works partially. When I verify the result through the console, I got this:
"metadata" : {"valueKind" : 3},

I verified that the field "metadata" is mapped as "flattened".

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.