fix: guesstimate/visualization

This commit is contained in:
Vyacheslav Matyukhin 2022-04-22 00:28:48 +04:00
parent 9a3b7c9d94
commit 3ef786db4b
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C

View File

@ -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.