Skip to content

Commit b50e797

Browse files
committed
WIP
1 parent 891b707 commit b50e797

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/compass-collection/src/transform-schema-to-field-info.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ function processType(
9696
}
9797

9898
const arrayPath = `${currentPath}[]`;
99-
const sampleValues = arraySampleValues || getSampleValues(arrayType);
99+
const sampleValues =
100+
arraySampleValues || getSampleValues(arrayType).slice(0, 3); // Limit full-context array sample values to 3
100101
processType(elementType, arrayPath, result, fieldProbability, sampleValues);
101102
} else if (type.name === 'Document' || type.bsonType === 'Document') {
102103
// Process nested document fields

0 commit comments

Comments
 (0)