The JS metadata index served `ne`, `exists:false`, and `missing:true` by materializing the ENTIRE id universe as an array of UUID strings, building a Set of the excluded ids, and filtering — O(N) heap and two full passes on the open-core path, on the most common shape (`deleted !== true`). Compute the complement as a roaring-bitmap difference over the int-id universe instead (`complementIds(excludeInts)` = universe \ exclude), converting only the result back to UUIDs. The exclude set is small (the matching value), so this avoids the full-corpus string materialization entirely. Behaviour is unchanged, including the load-bearing soft-delete semantic that `field !== value` includes entities with no such field. New focused tests pin `ne`/`exists:false`/ `missing:true`/`exists:true` result sets and that the complement reflects deletes. Full gate green: unit 1520, integration 607. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| add.test.ts | ||
| batch-operations.test.ts | ||
| counts-by-type-fix.test.ts | ||
| fill-subtypes.test.ts | ||
| find-agg-edge-cases.test.ts | ||
| find-complement-operators.test.ts | ||
| find-include-vectors.test.ts | ||
| find-index-integrity-guard.test.ts | ||
| find-orderby-pagek.test.ts | ||
| find.test.ts | ||
| get.test.ts | ||
| graph-analytics.test.ts | ||
| graph-export.test.ts | ||
| graph-native-routing.test.ts | ||
| graph-subgraph.test.ts | ||
| hybrid-search.test.ts | ||
| relate-duplicate-optimization.test.ts | ||
| relate.test.ts | ||
| related-node-bidirectional.test.ts | ||
| related-visibility-fast-path.test.ts | ||
| reserved-field-policy.test.ts | ||
| similar-threshold.test.ts | ||
| update-reserved-metadata-remap.test.ts | ||
| update.test.ts | ||
| upsert.test.ts | ||
| visibility.test.ts | ||