Closed hmnguyen1201 closed 4 years ago
I got a suggestion from a friend to initialize fields like source.port and process.pid as object type and that was the fix to my problem. Closing this ticket
Hi @hmnguyen1201, I think the issue here is more generally related to JSON deserialization to a type.
If two different indices contain a mapping with the same field name but a different type e.g. port
field with keyword
and integer
mappings in two different indices, then the type that the _source
document returned from each of the indices will be deserialized into must be able to successfully deserialize a string
and int
into the port
property on the type. Using object
as the port
property type would achieve this.
I am trying to query a field across multiple indices and select the fields using source filter using the query below but the query would fail if field source.port has different mappings in 2 different indices for example source.port == keyword on index a but == integer on index b. How can I make the query more tolerable to this mapping difference?
NEST/Elasticsearch.Net version: 7.6.2 Elasticsearch version: 7.6.2 Description of the problem including expected versus actual behavior:
The error I am getting: Elasticsearch.Net.Utf8Json.JsonParsingException: expected:'Number Token', actual:'"61899"', at offset:175