From b56929ec2657b40edff9dabc50fac610b81bf21c Mon Sep 17 00:00:00 2001 From: Mathieu Pillard Date: Thu, 12 Dec 2024 13:09:50 +0100 Subject: [PATCH] Use `integer` to index ratings counts, there might be more than what fits in a `short` (#22939) --- src/olympia/addons/indexers.py | 3 ++- src/olympia/amo/fixtures/base/addon_3615.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/olympia/addons/indexers.py b/src/olympia/addons/indexers.py index bfbf7d375034..69ad393c8a1f 100644 --- a/src/olympia/addons/indexers.py +++ b/src/olympia/addons/indexers.py @@ -489,7 +489,8 @@ def get_mapping(cls): 'ratings': { 'type': 'object', 'properties': { - 'count': {'type': 'short', 'index': False}, + 'count': {'type': 'integer', 'index': False}, + 'text_count': {'type': 'integer', 'index': False}, 'average': {'type': 'float'}, }, }, diff --git a/src/olympia/amo/fixtures/base/addon_3615.json b/src/olympia/amo/fixtures/base/addon_3615.json index 47b1efc51ee0..47271729dfc6 100644 --- a/src/olympia/amo/fixtures/base/addon_3615.json +++ b/src/olympia/amo/fixtures/base/addon_3615.json @@ -168,7 +168,7 @@ "icon_type": "image/png", "modified": "2010-05-28 09:01:57", "summary": 15004, - "total_ratings": 413 + "total_ratings": 32768 } }, {