How can I create a JSON that returns the results in this type of condition?
User_ID = 1234
AND Type_Search IN ('ALL', 'RESTRICT')
AND (
title contains 'example string'
OR
content contains 'example string'
)
I create this JSON, but i don't know how search the string columns and this example don't return data:
{
"query": {
"bool": {
"must":
[
{
"term": {
"user_id": 14492
}
},
{
"terms": {
"type_search": [
"ALL",
"RESTRICT"
]
}
},
{
"match": {
"title": "Modes"
}
},
{
"match": {
"content": "Modes"
}
}
]
}
}
}