将NEST升级到1.0.0 beta并将我的Elasticsearch服务器升级到1.1.1后,NEST不再映射我的嵌套对象。我的映射看起来像这样:
userdocuments: {
properties: {
id: {
index: not_analyzed
type: string
}
logs: {
include_in_all: true
include_in_root: true
include_in_parent: true
properties: {
logId: {
include_in_all: true
index: not_analyzed
type: string
}
name: {
include_in_all: true
index: not_analyzed
type: string
}
}
type: nested
}
}
}
我的c#模型看起来像这样:
public class UserDocument
{
public UserDocument()
{
Logs = new List<LogRefDocument>();
}
public List<LogRefDocument> Logs { get; set; }
public string Id { get; set; }
}
public class LogRefDocument
{
public string LogId { get; set; }
public string Name { get; set; }
}
在执行Get&lt; UserDocument&gt;(id).Source时,会返回用户文档,但LogRefDocument对象列表未映射到日志列表。
任何帮助?