내가 지금처럼 ConnectionSettings
객체를 구성하고 있습니다 :Elasticsearch 아이디 추론 5.x를
ConnectionSettings = new ConnectionSettings(settings.EndPointUrl)
.DefaultIndex("myindex")
.BasicAuthentication(settings.Username, settings.Password)
.PrettyJson()
.InferMappingFor<MyObject>(l => l
.IdProperty(p => p.UserId)
);
나는 인덱스 MyObject
, 그것은 InferMappingFor
설정을 존중하지 않습니다. 어떤 생각이 왜 InferMappingFor
var response = Elasticsearch.Client.Index(model, i => i
.Id(model.UserId)
);
을 작동하지 않는 : 나는 명시 적으로 Id
필드를 설정과 같이 인덱스 하나의 객체로 했어? 내가 놓친 게 있니?
'Elasticsearch.Client'는 위에 정의 된'ConnectionSettings'을 사용합니까? NEST 5.x를 사용합니까? – Rob