diff --git a/api/src/__tests__/__snapshots__/api.test.ts.snap b/api/src/__tests__/__snapshots__/api.test.ts.snap index 05d23ccc..f6865f8f 100644 --- a/api/src/__tests__/__snapshots__/api.test.ts.snap +++ b/api/src/__tests__/__snapshots__/api.test.ts.snap @@ -51,6 +51,7 @@ Object { "highlightLabel": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "label": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "matching": 133, + "score": 12.817251, "simpleLabel": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "siren": "855200507", } @@ -92,6 +93,7 @@ Object { "label": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "libelleCommuneEtablissement": "LYON 3EME", "matching": 1, + "score": 16.958105, "simpleLabel": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "siren": "855200507", "siret": "85520050703169", @@ -361,6 +363,7 @@ Object { "highlightLabel": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "label": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "matching": 18, + "score": 21.91652, "simpleLabel": "MANUFACTURE FRANCAISE DES PNEUMATIQUES MICHELIN", "siren": "855200507", } diff --git a/api/src/elastic/queries.ts b/api/src/elastic/queries.ts index 18b3b3bc..8536dea6 100644 --- a/api/src/elastic/queries.ts +++ b/api/src/elastic/queries.ts @@ -64,6 +64,7 @@ export const mapHit = libelleCommuneEtablissement, codePaysEtrangerEtablissement, }, + _score, inner_hits, highlight, }: any) => { @@ -169,6 +170,7 @@ export const mapHit = highlightLabel, label, matching, + score: _score, simpleLabel, siren, };