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
alpha
physical
Commits
795dbe2c
Commit
795dbe2c
authored
5 years ago
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hera
parent
42514adb
master
deploy/like-prod
deploy/like-stage
deploy/like-test
dev
like-pre/r01
test
2 merge requests
!331
hera
,
!332
Sun
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
1 deletion
+36
-1
topic.py
search/utils/topic.py
+36
-1
No files found.
search/utils/topic.py
View file @
795dbe2c
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
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