Commit 49ce2d7e authored by lixiaofang's avatar lixiaofang

add

parent 87920e61
......@@ -24,5 +24,29 @@
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
</code_scheme>
</component>
\ No newline at end of file
......@@ -718,6 +718,16 @@ class TopicUtils(object):
if v in (None, '', []):
continue
if k == "content":
f.append({
"match": {k: v}
})
if k == "virtual_content_level":
f.append({
"term": {k: v}
})
if k in ["create_time_gte", "create_time_lte"]:
if k == "create_time_gte":
......@@ -977,7 +987,13 @@ class TopicUtils(object):
@classmethod
def business_topic_ids(cls, filters, nfilters, sorts_by, offset=0, size=10, index_name="topic", filter_online=True):
# filter = {}
# for k, v in filters:
# if k != 'content':
# filter[k] = v
must = cls.process_filters(filters, filter_online=filter_online)
q = {
"query": {
"bool": {
......@@ -987,7 +1003,6 @@ class TopicUtils(object):
}
}
if sorts_by:
sorts = cls.process_sort(sorts_by)
if 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