Я пытаюсь настроить индекс вasticsearch и сталкиваюсь с проблемой с дочерним объектом.
Учитывая следующее:
public class VersionNo
{
public string Major { get; set; }
public string Minor { get; set; }
public string Build { get; set; }
public string Revision { get; set; }
public override string ToString()
{
return $"{Major}_{Minor}_{Build}_{Revision}";
}
}
public class Workflow
{
public string Id { get; set; }
public string Name { get; set; }
public VersionNo VersionNo { get; set; }
}
Как мне построить свободное отображение дляWorkflow.VersionNo, чтобы индекс заканчивался на "Major.Minor.Build.Revision"?В приведенном ниже примере я не могу понять, как настроить "versionNo", чтобы правильно комбинировать дочерние поля ...
.Mappings(ms => ms
.Map<Workflow>(m => m
.Properties(props => props
.Text(t => t
.Name("name")
)
.Text(t => t
.Name("versionNo")
)
.Text(t => t
.Name("id")
)
)
)
)