Description
NEST/Elasticsearch.Net version: 5.x
Elasticsearch version: 5.2
Description of the problem including expected versus actual behavior:
When I pass a null Id into the 1.x NEST client, the client overwrites the value with the MapIdPropertyFor property instead of passing null to ElasticSearch.
When I pass a null Id into the 5.x NEST client, the client does not overwrite the value with the MapIdPropertyFor property and passes null to ElasticSearch.
Steps to reproduce:
- Add MapIdPropertyFor to ConnectionSettings
- Index a document with the Id field populated with a null value
- See POST to ElasticSearch containing null instead of MapIdPropertyFor Value
Provide ConnectionSettings
(if relevant):
nestConnectionSettings.MapIdPropertyFor(x => x.Name);
Provide DebugInformation
(if relevant):
bd.Index(b => b
.Index(doc.Index)
.Type(doc.DocType)
.Id(null)
.Document(doc.Document));
Result Id: null
bd.Index(b => b
.Index(doc.Index)
.Type(doc.DocType)
.Document(doc.Document));
Result Id: doc.Name