我想按Groups.CategoryPriority
对结果进行排序,但要过滤组,以便仅按Groups.ParentGroupId
与PrimaryParentGroupId
匹配的组进行排序。
以下操作无效(忽略双引号,C#中多行字符串需要使用双引号):
""sort"": [
{
""Groups.CategoryPriority"": {
""order"": ""asc""
,""nested_path"": ""Groups""
,""nested_filter"": {
""match"": {
""Groups.ParentGroupId"": ""PrimaryParentGroupId""
}
}
}
}
]
我的产品文档模型示例:
{
"Id":1,
"PrimaryParentGroupId" : 1,
"PrimaryGroupId" : 2
"Groups":[
{
"Id":1,
"ParentGroupId" : 1,
"CategoryPriority":2
},
{
"Id":2,
"ParentGroupId" : 3,
"CategoryPriority":1
}
]
}