Hi ,
I need help with the Elasticsearch query.
My query is like this below.
GET record/_search
{
"_source": "Climate.Product.ProductCategory.ProductSubcategory.ProductModel.UnitMeasure.ProductModelIllustration.ProductDocument",
"query": {
"nested": {
"path": "Climate.Product.ProductCategory.ProductSubcategory.ProductModel.UnitMeasure.ProductModelIllustration.ProductDocument",
"query": {
"bool": {
"must": [
{
"match_phrase": {
"Climate.Product.ProductCategory.ProductSubcategory.ProductModel.UnitMeasure.ProductModelIllustration.ProductDocument.DocumentNode": "/3/1/"
}
}
]
}
}
}
}
}
And this is its result.
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 1,
"relation" : "eq"
},
"max_score" : 2.1220012,
"hits" : [
{
"_index" : "record",
"_type" : "_doc",
"_id" : "23",
"_score" : 2.1220012,
"_source" : {
"Climate" : [
{
"Product" : [
{
"ProductCategory" : [
{
"ProductSubcategory" : [
{
"ProductModel" : [
{
"UnitMeasure" : [
{
"ProductModelIllustration" : [
{
"ProductDocument" : [
{
"DocumentNode" : "/3/1/",
"ProductID" : 506,
"ModifiedDate" : "2013-12-29T13:51:58.103"
},
{
"DocumentNode" : "/3/2/",
"ProductID" : 506,
"ModifiedDate" : "2013-12-29T13:51:58.103"
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
}
]
}
}
I want to get just the document that contains DocumentNode:"/3/1/" , not whole ProductDocument.
Is there any way to do this ?
Thanks