Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
physical
Commits
56f1a2ba
Commit
56f1a2ba
authored
May 14, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
397a968c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
topic.py
search/utils/topic.py
+16
-0
business_topic.py
search/views/business_topic.py
+1
-1
No files found.
search/utils/topic.py
View file @
56f1a2ba
...
...
@@ -943,6 +943,7 @@ class TopicUtils(object):
"total_count"
:
0
}
@classmethod
@classmethod
def
business_filters
(
cls
,
filters
,
filter_online
=
True
):
"""处理过滤器部分。"""
...
...
@@ -973,6 +974,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
):
...
...
search/views/business_topic.py
View file @
56f1a2ba
...
...
@@ -19,7 +19,7 @@ def business_topic_search(filters, nfilters=None, sorts_by=None, offset=0, size=
try
:
result_list
=
TopicUtils
.
business_topic_id
(
result_list
=
TopicUtils
.
business_topic_id
s
(
filters
=
filters
,
nfilters
=
nfilters
,
sorts_by
=
sorts_by
,
offset
=
offset
,
size
=
size
,
filter_online
=
False
,
index_name
=
"topic"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment