-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
NEST/Elasticsearch.Net version: 2.4.1
Elasticsearch version: 2.33
Description of the problem including expected versus actual behavior:
If we have a string field holding a value that happens to look like a timestamp, and retrieve that field through a Fields() query, the field will get reformatted into a different form of date / time.
E.g. we have the mapping:
"mything" : {
"myname" : {
"type" : "string"
}
}
fronted by the class:
public class MyThing
{
[String]
public string MyName { get; set; }
}
We insert the following mything:
new MyThing() { MyName = "2016-07-12T06:06:35.203Z" }
and do a search like:
var name = client.Search<MyThing>(sd => sd.Fields(fd => fd.Field(mt => mt.MyName)))
.Fields.Select(fv => fv.Values<MyThing, string>(mt => mt.MyName)[0]).ToArray().[0]
We'll then find that name
has a value like "12/07/2016 06:06:35" (depending I think on language settings).
The culprit I think is in
return array.ToObject<K>(); |
Metadata
Metadata
Assignees
Labels
No labels