Skip to content

Commit 73def31

Browse files
authored
Merge pull request #337 from sot528/release/0.38.4
release 0.38.4
2 parents ca702d5 + b63a98f commit 73def31

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/common/es_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def search_tip_ranked_articles(elasticsearch, params, limit, page):
149149
}
150150
},
151151
'sort': [
152-
{'tip_value': 'desc'}
152+
{'sort_tip_value': 'desc'}
153153
],
154154
'from': limit * (page - 1),
155155
'size': limit

tests/handlers/articles/tip_ranking/test_articles_tip_ranking.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def setUp(self):
3737
'overview': 'overview02',
3838
'status': 'public',
3939
'topic': 'crypto',
40-
'tip_value': 12000000000000,
40+
'sort_tip_value': 12000000000000,
4141
'sort_key': 1520150272000001
4242
},
4343
{
@@ -48,7 +48,7 @@ def setUp(self):
4848
'overview': 'overview03',
4949
'status': 'public',
5050
'topic': 'fashion',
51-
'tip_value': 18000000000000,
51+
'sort_tip_value': 18000000000000,
5252
'sort_key': 1520150272000002
5353
},
5454
{
@@ -59,7 +59,7 @@ def setUp(self):
5959
'overview': 'overview04',
6060
'status': 'public',
6161
'topic': 'crypto',
62-
'tip_value': 6000000000000000000000000,
62+
'sort_tip_value': 6000000000000000000000000,
6363
'sort_key': 1520150272000003
6464
},
6565
{
@@ -70,7 +70,7 @@ def setUp(self):
7070
'overview': 'overview05',
7171
'status': 'public',
7272
'topic': 'fashion',
73-
'tip_value': 18000000000000.1,
73+
'sort_tip_value': 18000000000000.1,
7474
'sort_key': 1520150272000003
7575
}
7676
]
@@ -119,7 +119,7 @@ def test_main(self):
119119
'overview': 'overview04',
120120
'status': 'public',
121121
'topic': 'crypto',
122-
'tip_value': 6000000000000000000000000,
122+
'sort_tip_value': 6000000000000000000000000,
123123
'sort_key': 1520150272000003
124124
},
125125
{
@@ -130,7 +130,7 @@ def test_main(self):
130130
'overview': 'overview05',
131131
'status': 'public',
132132
'topic': 'fashion',
133-
'tip_value': 18000000000000.1,
133+
'sort_tip_value': 18000000000000.1,
134134
'sort_key': 1520150272000003
135135
}
136136
]
@@ -152,7 +152,7 @@ def test_main_ok_with_no_limit(self):
152152
'overview': 'overview03',
153153
'status': 'public',
154154
'topic': 'crypto',
155-
'tip_value': 18000000000000,
155+
'sort_tip_value': 18000000000000,
156156
'sort_key': 1520150273000000 + i
157157
}
158158
)
@@ -185,7 +185,7 @@ def test_main_ok_with_topic(self):
185185
'overview': 'overview05',
186186
'status': 'public',
187187
'topic': 'fashion',
188-
'tip_value': 18000000000000.1,
188+
'sort_tip_value': 18000000000000.1,
189189
'sort_key': 1520150272000003
190190
},
191191
{
@@ -196,7 +196,7 @@ def test_main_ok_with_topic(self):
196196
'overview': 'overview03',
197197
'status': 'public',
198198
'topic': 'fashion',
199-
'tip_value': 18000000000000,
199+
'sort_tip_value': 18000000000000,
200200
'sort_key': 1520150272000002
201201
}
202202
]
@@ -223,7 +223,7 @@ def test_main_ok_with_page(self):
223223
'overview': 'overview02',
224224
'status': 'public',
225225
'topic': 'crypto',
226-
'tip_value': 12000000000000,
226+
'sort_tip_value': 12000000000000,
227227
'sort_key': 1520150272000001
228228
}
229229
]

tests/tests_common/tests_es_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def create_tip_ranked_articles_index(elasticsearch, index_name):
3737
'mappings': {
3838
'article_tip_ranking': {
3939
'properties': {
40-
'tip_value': {
40+
'sort_tip_value': {
4141
'type': 'double'
4242
}
4343
}

0 commit comments

Comments
 (0)