Hi,
I am running following query.
GET products/_search
{
"size": 0,
"aggs": {
"products": {
"terms": {
"field": "product_id",
"size": 10
},"aggs": {
"result": {
"top_hits": {
"size": 1,
"_source": {"includes": []}
}
}
}
}
},
"query": {
"bool": {
"must": [
{
"multi_match": {
"query": "top"
}
}
],
"filter": {
"script": {
"script": {
"source": "doc['display_product_color_id'].value == doc['color_id'].value",
"lang": "painless"
}
}
, "and": {
"filters": [
{
"script": {
"script": {
"source": "doc['image_src'].value != ''",
"lang": "painless"
}
}
}
]
}
}
}
}
}
I am getting following error
[script] malformed query, expected [END_OBJECT] but found [FIELD_NAME]
thanks