Hi,
I'm trying to run a script query to get all docs with a boolean AND condition and I could not found and examples on how to do this. I have this script working:
GET indexX/_search?size=1000
{
"query": {
"bool": {
"must": [{
"script": {
"script": """
doc['field1.keyword'].value == doc['field1.keyword'].value
"""
}
}
]
}
}
}type or paste code here
I would like to add a Boolean AND, something like this:
GET indexX/_search?size=1000
{
"query": {
"bool": {
"must": [{
"script": {
"script": """
doc['field1.keyword'].value == doc['field1.keyword'].value *AND
doc['fieldB.keyword'].value != doc['fieldB.keyword'].value*
"""
}
}
]
}
}
}
type or paste code here
can someone help with the right syntax
thanks