I have an array of styles as follows in my index:
[
{
"id": 1,
"name": "Tailored",
"product_style": {
"style_score": 0.06710671,
"is_tag": false
}
},
{
"id": 2,
"name": "Romantic",
"product_style": {
"style_score": 0.112370689,
"is_tag": true
}
},
{
"id": 3,
"name": "Punk / Grunge",
"product_style": {
"style_score": 0.055999716,
"is_tag": false
}
}
]
I want to access a particular index of style array in my script.
I tried something like this:
script: "doc[styles.product_style.style_score].values[1]"
But it is giving null pointer exception. Please help