doc-parser-server/config/99-常用es语句.http
2025-05-21 18:01:36 +08:00

55 lines
1000 B
HTTP

#{
# "keywordGroups": [
# ["Luke.Ye", ""],
# ]
#}
# ( AND Luke.Ye)
POST /documents/_search
{
"query": {
"bool": {
"should": [
{
"bool": {
"must": [
{ "multi_match": { "query": "", "fields": ["filename", "content"], "type": "phrase" }},
{ "multi_match": { "query": "Luke.Ye", "fields": ["filename", "content"], "type": "phrase" }}
]
}
}
],
"minimum_should_match": 1
}
},
"highlight": {
"pre_tags": ["<mark>"],
"post_tags": ["</mark>"],
"fields": {
"content": {
"fragment_size": 100,
"number_of_fragments": 3
},
"filename": {
"fragment_size": 100,
"number_of_fragments": 1
}
}
},
"sort": [
{ "mtime": "desc" }
],
"size": 10,
"from": 0
}
#
POST /documents/_delete_by_query
{
"query": {
"match_all": {}
}
}