Commit e2c35817 authored by lixiaofang's avatar lixiaofang

hera

parent 42514adb
......@@ -912,6 +912,7 @@ class TopicUtils(object):
def business_topic_ids(cls, filters, nfilters, sorts_by, offset=0, size=10, index_name="topic", filter_online=True):
must = cls.business_filters(filters, filter_online=filter_online)
logging.info("get must:%s" % must)
q = {
"query": {
"bool": {
......@@ -919,6 +920,7 @@ class TopicUtils(object):
"must_not": cls.process_nfilters(nfilters),
}
}
}
if sorts_by:
......@@ -965,7 +967,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 +980,21 @@ 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,
}
}
})
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