elasticsearch Elasticsearch嵌套,父/子关系,elasticsearch,nest,elasticsearch,Nest" /> elasticsearch Elasticsearch嵌套,父/子关系,elasticsearch,nest,elasticsearch,Nest" />

elasticsearch Elasticsearch嵌套,父/子关系

elasticsearch Elasticsearch嵌套,父/子关系,elasticsearch,nest,elasticsearch,Nest,您能帮助我使用elasticsearch的NESTclient定义父/子关系吗? 我的代码如下所示: [ElasticType(Name = "type_properties", DateDetection = true,.....)] public class Properties{....} 我定义了父类型,但我没有看到与父属性相关的销售文档 { "_index": "testparentchild", "_type": "type_sales", "_id": "dVd1t

您能帮助我使用elasticsearch的
NESTclient
定义父/子关系吗? 我的代码如下所示:

[ElasticType(Name = "type_properties", DateDetection = true,.....)]
public class Properties{....}

我定义了父类型,但我没有看到与父属性相关的销售文档

{
  "_index": "testparentchild",
  "_type": "type_sales",
  "_id": "dVd1tUJ0SNyoiSer7sNA",
  "_version": 1,
  "_score": 1,
  "_source": {
    "salesRecId": 179504762,
    "salesPrice": 150000,
    "salesDate": "2003-04-07T00:00:00",
  }
}

不推荐使用基于属性的映射,因为所有可能的映射都不能用这种方式表示


如何为您的类型正确应用映射

谢谢!,我快速看了一眼,我想我明白了。再次感谢。此链接不再有效
{
  "_index": "testparentchild",
  "_type": "type_sales",
  "_id": "dVd1tUJ0SNyoiSer7sNA",
  "_version": 1,
  "_score": 1,
  "_source": {
    "salesRecId": 179504762,
    "salesPrice": 150000,
    "salesDate": "2003-04-07T00:00:00",
  }
}