Extend all eight index/search packages with practical helpers for app development and fix semantic-vector getStats() to expose real metrics. Per-module code: - bloom-gossip: listKeys(), clear() - inverted-index: searchAll(and|or), getDocTerms() - fulltext-lite: search(and|or), suggest(prefix) - trie-prefix: countPrefix(), autocomplete(limit) - graph-index: removeEdge(), outDegree(), edgeCount() - similarity-lsh: nearVector(), bucketCount() - semantic-vector-index: getStats() delegates to getMetrics() + PROTOCOL export - spatial-index: listLocalPoints(), pointCount(), protocol in getStats() Tests added for new APIs across six packages; all indexes-search npm test suites pass (8/8). Docs: - Rewrite indexes-search category README (module table, composition) - Expand bloom-gossip and semantic-vector architecture notes - modules/README.md: link indexes-search doc hub Parent workspace docs/indexes-search/README.md and MODULE_DOC_PASS.md updated separately (outside this git root). Co-authored-by: Cursor <[email protected]>
hyper-spatial-index
Novel Spatial Index for P2P: - Uses a simple but effective quadtree-inspired grid persisted in Hyperbee - Supports insert, range query, nearest neighbor - Integrates with Hyperswarm for peer location announcements
Category: Indexes & search
Composes with: hyper-p2p-semantic-vector-index, hyper-p2p-intent-router
Protocol: hyper-spatial-index/v1
When to use
Geo-fenced queries, nearest-neighbor search in apps and demos.
When not to use
Distributed spatial sharding (use intent-router + app-specific partitioning).
Quick start
const { SpatialIndex } = require('hyper-spatial-index')
const topic = process.argv[2] // 64-char hex or string
const mod = new SpatialIndex({ topic, gridSize: 1000 })
await mod.ready()
// ... application logic ...
await mod.close()
Docs
-
docs/api.md — constructor, methods, events, errors
-
docs/architecture.md — wire types, state, composition
-
../_shared/PRODUCTION.md — production checklist
-
../_shared/DOC_STANDARDS.md — documentation standards
-
Integration:
../../real_tests/integration/—spatial-index-two-node.js
Test
npm install && npm test