-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathquery.json
More file actions
29 lines (26 loc) · 843 Bytes
/
query.json
File metadata and controls
29 lines (26 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 단순 검색
{
"size": request['numOfCnt'],
"query": {
"multi_match": {
"query": request['keyword'],
"fields": ["post_title", "post_body", "fileName", "fileContent"]
}
}
}
# 상세 검색
{
"size": request['numOfCnt'],
"query": {
"bool": {
"should":[
{"match": {"post_title": request['keyInTitle'] }},
{"match": {"post_body": request['keyInBody'] }},
{"match": {"post_writer": request['writer'] }},
{"match": {"published_institution": request['institution'] }},
],
"sort": [{"post_date": {"order" : "desc" #오름차순: asc, 내림차순: desc }}]
},
"filter": {"range": { "post_date": { "gte": request['startDate'], "lte": request['endDate'] }}}
}
}