Commit 795dbe2c authored by lixiaofang's avatar lixiaofang

hera

parent 42514adb
......@@ -965,7 +965,12 @@ class TopicUtils(object):
if k == "content":
f.append({
"match": {k: v}
"multi_match": {
"fields": ["content"],
"type": "cross_fields",
"operator": "and",
"query": v
}
})
elif k == "virtual_content_level":
......@@ -973,6 +978,36 @@ class TopicUtils(object):
"match": {k: v}
})
elif k in ["create_time_gte", "create_time_lte"]:
if k == "create_time_gte":
op = "gte"
elif k == "create_time_lte":
op = "lte"
f.append({
"range": {
"create_time_val": {
op: v,
}
}
})
elif k == "drop_score":
if v == "0":
f.append({
"term": {k: v}
})
else:
f.append({
"range": {
"drop_score": {
"gte": v,
}
}
})
else:
if isinstance(v, list):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment