【问题标题】:Elasticsearch field name inferenceElasticsearch 字段名称推断
【发布时间】:2022-08-14 15:28:15
【问题描述】:

我有动态名称的文档,例如:

{
    \"field.customerA\": 4,
    \"field.customerB\": 10
}

而我的 POCO 对象中只有“字段”:

public class Poco {
    public string field {get; set;}
}

我试图实现的是用来自文档的客户的特定字段值填充字段属性。客户在运行时是已知的。 有可能达到这样的结果吗?也许有某种反序列化? 谢谢。

    标签: c# .net nest


    【解决方案1】:

    经过一番搜索和阅读,我终于实现了SourceSerializer,如建议的那样 custom serialization

    【讨论】:

      猜你喜欢
      • 2016-04-20
      • 1970-01-01
      • 2015-04-14
      • 1970-01-01
      • 1970-01-01
      • 2014-02-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多