Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
Browse files Browse the repository at this point in the history
…-fix'
  • Loading branch information
kibanamachine committed Aug 16, 2023
1 parent 1c08374 commit f309a54
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -18,13 +18,14 @@ export function transformResults(
const boundarySplitBuckets = results?.aggregations?.shapes?.buckets ?? {};
for (const boundaryId in boundarySplitBuckets) {
const entitySplitBuckets = boundarySplitBuckets[shapeLocationId]?.entitySplit?.buckets ?? [];
for (let i=0; i<entitySplitBuckets.length; i++) {
for (let i = 0; i < entitySplitBuckets.length; i++) {
const entityName = entitySplitBuckets[i].key;
const entityResults = resultsMap.get(entityName) ?? [];
entityResults.push({
location: entitySplitBuckets[i].entityHits?.hits?.hits?.[0]?.fields?.[geoField]?.[0] ?? '',
shapeLocationId: boundaryId,
dateInShape: entitySplitBuckets[i].entityHits?.hits?.hits?.[0]?.fields?.[dateField]?.[0] ?? null,
dateInShape:
entitySplitBuckets[i].entityHits?.hits?.hits?.[0]?.fields?.[dateField]?.[0] ?? null,
docId: entitySplitBuckets[i].entityHits?.hits?.hits?.[0]?._id,
});
resultsMap.set(entityName, entityResults);
Expand Down

0 comments on commit f309a54

Please sign in to comment.