|
@@ -69,11 +69,11 @@ def es_query(title: str, publish_time: int):
|
|
|
|
|
|
time_limit = {"range": {'publishtime': {"from": stime, "to": etime}}}
|
|
|
should_list = get_should(title) # 对标题进行分词组合query语句
|
|
|
- should_list.append(time_limit)
|
|
|
# 通过发布标题和发布时间范围查询
|
|
|
query = {
|
|
|
"query": {
|
|
|
"bool": {
|
|
|
+ "must": [time_limit],
|
|
|
"should": should_list,
|
|
|
"minimum_should_match": "10<90%",
|
|
|
}
|