2013-10-11 116 views
0

您可以帮助我使用NESTclient进行elasticsearch定义父母/子女关系吗? 我的代码看起来是这样的:Elasticsearch Nest,父母/子女关系

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

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

我定义的ParentType的,但我没有看到相关的parent属性这个销售单据。

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

回答