can you help me out to define a parent/child relationship using NESTclient
for elasticsearch? my code looks like this:
[ElasticType(Name = "type_properties", DateDetection = true,.....)]
public class Properties{....}
[ElasticType(Name = "type_sales", DateDetection = true, , ParentType = "type_properties")]
public class SalesHistory{....}
I defined the parentType, but I don't see this sales documents related to a parent property.
{
"_index": "testparentchild",
"_type": "type_sales",
"_id": "dVd1tUJ0SNyoiSer7sNA",
"_version": 1,
"_score": 1,
"_source": {
"salesRecId": 179504762,
"salesPrice": 150000,
"salesDate": "2003-04-07T00:00:00",
}
}
The attribute based mapping is deprecated since all the possible mapping possibilities cannot be expressed that way.
How to properly apply a mapping for your type.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.