anmi
2 years agoAdept
json query syntax matches AND OR
Hello,
I cannot find the full json query syntax documentation here. Thats wha I'm asking in this post:
How does a json based query look like for AND matches in body text. I want to query all posts containing term1 AND term2 in their body.
My query currently is this. How do I add the term2?
[
{
"messages":{
"fields":[
"id",
"subject",
"search_snippet",
"body",
"cover_image.view_href",
"teaser",
"view_href",
"author",
"conversation.last_post_time",
"replies.count(*)",
"kudos.sum(weight)",
"metrics.views",
"labels"
],
"constraints":[
{
"category.id":"DE",
"conversation.style":"tkb",
"body":{ "matches":"term1" },
"depth":0
}
],
"sorts": [
"post_time desc"
],
"limit":10,
"subQueries":{
"labels":{
"fields":[
"text",
"id"
]
}
}
}
}
]