Commit d9836e35 authored by zhanglu's avatar zhanglu

Merge branch 'feature/searth_topic' into 'dev'

Feature/searth topic

See merge request !89
parents 9d0d8d3b 0dc34b1f
...@@ -527,8 +527,9 @@ class TopicUtils(object): ...@@ -527,8 +527,9 @@ class TopicUtils(object):
q = { q = {
"query": { "query": {
"filtered": { "bool": {
"query": {"match_all":{}}, "must": cls.process_filters(filters),
"must_not": cls.process_nfilters(nfilters),
} }
}, },
"_source": { "_source": {
...@@ -537,16 +538,6 @@ class TopicUtils(object): ...@@ -537,16 +538,6 @@ class TopicUtils(object):
"sort": [], "sort": [],
} }
if filters or nfilters:
f = cls.process_filters(filters)
nf = cls.process_nfilters(nfilters)
q["query"]["filtered"]["filter"] = {
"bool": {
"must": f,
"must_not": nf,
}
}
if sorts_by: if sorts_by:
sorts = cls.process_sort(sorts_by) sorts = cls.process_sort(sorts_by)
q["sort"] = sorts q["sort"] = sorts
......
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