can i get b value in nested script query?
PUT test
{
"mappings": {
"properties": {
"b": {
"type": "keyword"
},
"nested": {
"type": "nested",
"properties": {
"a": {
"type": "keyword"
}
}
}
}
}
}
POST test/_search
{
"query": {
"nested": {
"path": "nested",
"query": {
"script": {
"script": """
doc['nested.a'].value == doc['b'].value
"""
}
}
}
}
}