{
class: 1,
users: [{
name: 'abc',
surname: 'def'
}, {
name: 'xyz',
surname: 'wef'
}, {
name: 'abc',
surname: 'pqr'
}]
}
I have a document structure like above object and I want to return only users who have name 'abc' but problem is it matches name 'abc' but returns
all array. I want only matched users .
Mapping -
{
"class":"string",
"users" : {
"type" : "nested",
"properties": {
"name" : {"type": "string" },
"surname" : {"type": "string" }
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…