Files
modules/indexes-search/hyper-p2p-inverted-index/examples/basic.js
T
2026-05-20 22:56:32 -04:00

12 lines
309 B
JavaScript

require('bare-process/global')
const { HyperP2PInvertedIndex } = require('../index.js')
async function main () {
const m = new HyperP2PInvertedIndex()
m.index('doc-1', ['pear', 'runtime'])
console.log('[inverted-index]', m.search('pear'), m.getStats())
await m.close()
}
main().catch(console.error)