@yoch/frozenminisearch 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -411,6 +411,21 @@ interface FrozenPostingsLayout {
411
411
  /** Adaptive-width unsigned column (1/2/4 bytes per element) for field lengths and packed radix columns. */
412
412
  type FieldLengthArray = PackedIndexArray;
413
413
 
414
+ /**
415
+ * Runtime stored fields. Single store field → one column (no per-doc Record at rest).
416
+ * Wire format stays row JSON; encode/decode can skip intermediate row arrays when layout is known.
417
+ */
418
+ type StoredFieldsLayout = {
419
+ kind: 'none';
420
+ } | {
421
+ kind: 'single';
422
+ field: string;
423
+ values: unknown[];
424
+ } | {
425
+ kind: 'multi';
426
+ rows: (Record<string, unknown> | undefined)[];
427
+ };
428
+
414
429
  interface FrozenMemoryBreakdown {
415
430
  termCount: number;
416
431
  documentCount: number;
@@ -456,7 +471,7 @@ interface FrozenAssembleParams<T = any> {
456
471
  fieldCount: number;
457
472
  externalIds: unknown[];
458
473
  idLookup: IdToShortIdLookup;
459
- storedFields: (Record<string, unknown> | undefined)[];
474
+ storedFields: StoredFieldsLayout;
460
475
  fieldLengthMatrix: FieldLengthArray;
461
476
  avgFieldLength: Float32Array;
462
477
  index: FrozenTermIndex;