From 3ef786db4bdd1e456c6c890e2fe766ff7752efe6 Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Fri, 22 Apr 2022 00:28:48 +0400 Subject: [PATCH] fix: guesstimate/visualization --- src/web/worker/searchGuesstimate.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/web/worker/searchGuesstimate.ts b/src/web/worker/searchGuesstimate.ts index 51a6eb1..8af4a4c 100644 --- a/src/web/worker/searchGuesstimate.ts +++ b/src/web/worker/searchGuesstimate.ts @@ -34,7 +34,7 @@ export default async function searchGuesstimate( ? model.description.replace(/\n/g, " ").replace(/ /g, " ") : ""; const stars = description.length > 250 ? 2 : 1; - return { + const q: AlgoliaQuestion = { id: `guesstimate-${model.id}`, title: model.name, url: `https://www.getguesstimate.com/models/${model.id}`, @@ -48,10 +48,12 @@ export default async function searchGuesstimate( numforecasters: 1, }, stars, - extra: {}, - visualization: model.big_screenshot, - ranking: 10 * (index + 1) - 0.5, //(model._rankingInfo - 1*index)// hack + extra: { + visualization: model.big_screenshot, + }, + // ranking: 10 * (index + 1) - 0.5, //(model._rankingInfo - 1*index)// hack }; + return q; }); // filter for duplicates. Surprisingly common.