_source excludes 排除返回字段,sort时间倒序排序,from size分页
{
"query": {
"bool": {
"should": [
{
"match_phrase": {
"title": "xxx"
}
},
{
"match_phrase": {
"content": "xxx"
}
}
]
}
},
"_source": {
"excludes": [
"content"
]
},
"sort": [
{
"news_time": {
"order": "desc"
}
}
],
"from": 0,
"size": 20
}
{
"query": {
"constant_score": {
"filter": {
"term": {
"tags.keyword": "xxx"
}
}
}
}
}
{
"query": {
"constant_score": {
"filter": {
"terms": {
"tags.keyword": [
"xxx",
"yyy"
]
}
}
}
}
}
{
"query": {
"bool": {
"should": [
{
"term": {
"tags.keyword": "xxx"
}
},
{
"term": {
"category.keyword": "yyy"
}
}
]
}
}
}
{
"query": {
"bool": {
"filter": [
{
"term": {
"tags.keyword": "xxx"
}
},
{
"term": {
"category.keyword": "yyy"
}
}
]
}
}
}
{
"query": {
"bool": {
"must_not": [
{
"ids": {
"values": [
"f2t6cIEB1CYi8x_aKrHr",
"gmuAcIEB1CYi8x_a9rFL"
]
}
}
],
"should": [
{
"match": {
"content": "xxx"
}
}
]
}
}
}