Skip to content

Commit

Permalink
Merge pull request #337 from sot528/release/0.38.4
Browse files Browse the repository at this point in the history
release 0.38.4
  • Loading branch information
y-temp4 authored Jun 13, 2019
2 parents ca702d5 + b63a98f commit 73def31
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/common/es_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def search_tip_ranked_articles(elasticsearch, params, limit, page):
}
},
'sort': [
{'tip_value': 'desc'}
{'sort_tip_value': 'desc'}
],
'from': limit * (page - 1),
'size': limit
Expand Down
20 changes: 10 additions & 10 deletions tests/handlers/articles/tip_ranking/test_articles_tip_ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def setUp(self):
'overview': 'overview02',
'status': 'public',
'topic': 'crypto',
'tip_value': 12000000000000,
'sort_tip_value': 12000000000000,
'sort_key': 1520150272000001
},
{
Expand All @@ -48,7 +48,7 @@ def setUp(self):
'overview': 'overview03',
'status': 'public',
'topic': 'fashion',
'tip_value': 18000000000000,
'sort_tip_value': 18000000000000,
'sort_key': 1520150272000002
},
{
Expand All @@ -59,7 +59,7 @@ def setUp(self):
'overview': 'overview04',
'status': 'public',
'topic': 'crypto',
'tip_value': 6000000000000000000000000,
'sort_tip_value': 6000000000000000000000000,
'sort_key': 1520150272000003
},
{
Expand All @@ -70,7 +70,7 @@ def setUp(self):
'overview': 'overview05',
'status': 'public',
'topic': 'fashion',
'tip_value': 18000000000000.1,
'sort_tip_value': 18000000000000.1,
'sort_key': 1520150272000003
}
]
Expand Down Expand Up @@ -119,7 +119,7 @@ def test_main(self):
'overview': 'overview04',
'status': 'public',
'topic': 'crypto',
'tip_value': 6000000000000000000000000,
'sort_tip_value': 6000000000000000000000000,
'sort_key': 1520150272000003
},
{
Expand All @@ -130,7 +130,7 @@ def test_main(self):
'overview': 'overview05',
'status': 'public',
'topic': 'fashion',
'tip_value': 18000000000000.1,
'sort_tip_value': 18000000000000.1,
'sort_key': 1520150272000003
}
]
Expand All @@ -152,7 +152,7 @@ def test_main_ok_with_no_limit(self):
'overview': 'overview03',
'status': 'public',
'topic': 'crypto',
'tip_value': 18000000000000,
'sort_tip_value': 18000000000000,
'sort_key': 1520150273000000 + i
}
)
Expand Down Expand Up @@ -185,7 +185,7 @@ def test_main_ok_with_topic(self):
'overview': 'overview05',
'status': 'public',
'topic': 'fashion',
'tip_value': 18000000000000.1,
'sort_tip_value': 18000000000000.1,
'sort_key': 1520150272000003
},
{
Expand All @@ -196,7 +196,7 @@ def test_main_ok_with_topic(self):
'overview': 'overview03',
'status': 'public',
'topic': 'fashion',
'tip_value': 18000000000000,
'sort_tip_value': 18000000000000,
'sort_key': 1520150272000002
}
]
Expand All @@ -223,7 +223,7 @@ def test_main_ok_with_page(self):
'overview': 'overview02',
'status': 'public',
'topic': 'crypto',
'tip_value': 12000000000000,
'sort_tip_value': 12000000000000,
'sort_key': 1520150272000001
}
]
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_common/tests_es_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_tip_ranked_articles_index(elasticsearch, index_name):
'mappings': {
'article_tip_ranking': {
'properties': {
'tip_value': {
'sort_tip_value': {
'type': 'double'
}
}
Expand Down

0 comments on commit 73def31

Please sign in to comment.