{"_id":"@bigmoves/tantivy-js","_rev":"3-da890cff8cb330882eac7289fe7c9797","name":"@bigmoves/tantivy-js","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@bigmoves/tantivy-js","version":"0.1.0","keywords":["search","tantivy","full-text","native","napi"],"license":"MIT","_id":"@bigmoves/tantivy-js@0.1.0","maintainers":[{"name":"bigmoves","email":"chad.tmiller15@gmail.com"}],"dist":{"shasum":"553eed53c831c6fc0f0aadc6a7a69a9d36803f8e","tarball":"https://registry.npmjs.org/@bigmoves/tantivy-js/-/tantivy-js-0.1.0.tgz","fileCount":8,"integrity":"sha512-2jKndUqdl09NJXh+cEpCei8xK9tXk1IwHwrCKxY4mRc7MYch5+Riu1Vb8a0cM0A3kXFE+j426Ue3dsTS2aEzeg==","signatures":[{"sig":"MEUCIQDjKGKMLgig1J5YGVRMhviMktGkgVDK0mq6DChGMYZJ8QIgXFu3r+mWTCjN0wzNTAX2Le/JCzuMhyg4ZnlkqFF+ymk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4833368},"main":"src/index.js","napi":{"name":"tantivy-js-core","triples":{"defaults":false,"additional":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu"]}},"type":"module","exports":{".":{"types":"./types/index.d.ts","import":"./src/index.js"}},"gitHead":"d10f3864236bccbde92cdedb3c7eb3b7318c7047","scripts":{"lint":"oxlint src test","test":"vitest","build":"napi build --platform --release --cargo-cwd ./crates/tantivy-js-core","typecheck":"tsc --noEmit","build:debug":"napi build --platform --cargo-cwd ./crates/tantivy-js-core","prepublishOnly":"napi prepublish --skip-gh-release"},"_npmUser":{"name":"bigmoves","email":"chad.tmiller15@gmail.com"},"_npmVersion":"10.9.3","description":"Full-text search powered by tantivy, compiled to native Node.js addon","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"oxlint":"^0.16.0","vitest":"^2.1.0","typescript":"^5.7.0","@types/node":"^25.2.0","@napi-rs/cli":"^2.18.0"},"optionalDependencies":{"@bigmoves/tantivy-js-darwin-x64":"0.1.0","@bigmoves/tantivy-js-darwin-arm64":"0.1.0","@bigmoves/tantivy-js-linux-x64-gnu":"0.1.0","@bigmoves/tantivy-js-linux-arm64-gnu":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/tantivy-js_0.1.0_1770220445704_0.3457439447328101","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@bigmoves/tantivy-js","version":"0.1.5","keywords":["search","tantivy","full-text","native","napi"],"license":"MIT","_id":"@bigmoves/tantivy-js@0.1.5","maintainers":[{"name":"therealbigmoves","email":"chad.tmiller15@gmail.com"}],"homepage":"https://github.com/bigmoves/tantivy-js#readme","bugs":{"url":"https://github.com/bigmoves/tantivy-js/issues"},"dist":{"shasum":"dbbe7209d3b21258a7e73cd52aac15eee7ad6f51","tarball":"https://registry.npmjs.org/@bigmoves/tantivy-js/-/tantivy-js-0.1.5.tgz","fileCount":9,"integrity":"sha512-q1rLeJskdYQW+j3meTHGAc4qa80bAxgIod/Cd9Qb2wa48lBaqazJakAOebzDDB2Y3mN/m0dhKNEQvOd/OXWZTg==","signatures":[{"sig":"MEQCIEuAzxslT4i55Y7nmUyeJO+HIYVGw5eh2u567Vu1TqJ+AiB71JQQhboQqcL7Yy6XSpnlbEfqTns2o8JjTAL9wL45gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4834535},"main":"src/index.js","napi":{"name":"tantivy-js-core","triples":{"defaults":false,"additional":["x86_64-apple-darwin","aarch64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu"]}},"type":"module","exports":{".":{"types":"./types/index.d.ts","import":"./src/index.js"}},"gitHead":"5d23d90ae5fd94087c7d1178b548f3898089cc49","scripts":{"lint":"oxlint src test","test":"vitest","build":"napi build --platform --release --cargo-cwd ./crates/tantivy-js-core","typecheck":"tsc --noEmit","build:debug":"napi build --platform --cargo-cwd ./crates/tantivy-js-core","prepublishOnly":"napi prepublish --skip-gh-release"},"_npmUser":{"name":"therealbigmoves","email":"chad.tmiller15@gmail.com"},"repository":{"url":"git+https://github.com/bigmoves/tantivy-js.git","type":"git"},"_npmVersion":"10.9.3","description":"Full-text search powered by tantivy, compiled to native Node.js addon","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"oxlint":"^0.16.0","vitest":"^2.1.0","typescript":"^5.7.0","@types/node":"^25.2.0","@napi-rs/cli":"^2.18.0"},"optionalDependencies":{"@bigmoves/tantivy-js-darwin-x64":"0.1.5","@bigmoves/tantivy-js-darwin-arm64":"0.1.5","@bigmoves/tantivy-js-linux-x64-gnu":"0.1.5","@bigmoves/tantivy-js-linux-arm64-gnu":"0.1.5"},"_npmOperationalInternal":{"tmp":"tmp/tantivy-js_0.1.5_1770224743357_0.40465076073445516","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-02-04T15:54:05.642Z","modified":"2026-03-15T23:13:58.400Z","0.1.0":"2026-02-04T15:54:05.953Z","0.1.5":"2026-02-04T17:05:43.571Z"},"bugs":{"url":"https://github.com/bigmoves/tantivy-js/issues"},"license":"MIT","homepage":"https://github.com/bigmoves/tantivy-js#readme","keywords":["search","tantivy","full-text","native","napi"],"repository":{"url":"git+https://github.com/bigmoves/tantivy-js.git","type":"git"},"description":"Full-text search powered by tantivy, compiled to native Node.js addon","maintainers":[{"email":"chad.tmiller15@gmail.com","name":"therealbigmoves"},{"email":"chadtmiller15@gmail.com","name":"chadtmiller"}],"readme":"# tantivy-js\n\nFull-text search powered by [tantivy](https://github.com/quickwit-oss/tantivy) as a native Node.js addon. Multi-threaded, fast, with support for in-memory and persistent indexes.\n\n## Installation\n\n```bash\nnpm install @bigmoves/tantivy-js\n```\n\n## Usage\n\n```javascript\nimport { SchemaBuilder, Index } from '@bigmoves/tantivy-js';\n\n// Define schema\nconst schema = new SchemaBuilder()\n  .addTextField('title', { stored: true, indexed: true })\n  .addTextField('body', { stored: true, indexed: true })\n  .addI64Field('year', { stored: true })\n  .build();\n\n// Create in-memory index\nconst index = Index.create(schema);\n\n// Or open/create a persistent index\n// const index = Index.open('./my-index', schema);\n\n// Add documents\nconst writer = index.writer();\nwriter.addDocument({ title: 'Rust Programming', body: 'Learn Rust basics', year: 2024 });\nwriter.addDocument({ title: 'JavaScript Guide', body: 'Modern JS patterns', year: 2023 });\nwriter.commit();\n\n// Search\nconst searcher = index.searcher();\nconst results = searcher.search('rust', ['title', 'body'], { limit: 10 });\nconsole.log(results);\n// [{ title: 'Rust Programming', body: 'Learn Rust basics', year: 2024 }]\n```\n\n## Query Syntax\n\ntantivy-js supports the standard tantivy query syntax:\n\n- **Terms:** `rust` - matches documents containing \"rust\"\n- **Phrases:** `\"hello world\"` - matches exact phrase\n- **Boolean:** `rust AND programming`, `rust OR javascript`, `rust NOT beginner`\n- **Field-specific:** `title:rust` - search only in title field\n\n## API\n\n### `SchemaBuilder`\n\n- `addTextField(name, options?)` - Add a text field\n- `addI64Field(name, options?)` - Add an integer field\n- `addF64Field(name, options?)` - Add a float field\n- `addBytesField(name, options?)` - Add a bytes field\n- `build()` - Build the schema\n\nField options:\n- `stored: boolean` - Store value for retrieval (default: false)\n- `indexed: boolean` - Index for searching (default: true)\n- `fast: boolean` - Enable fast field (numeric only, default: false)\n\n### `Index`\n\n- `Index.create(schema)` - Create a new in-memory index\n- `Index.open(path, schema)` - Open or create a persistent index at path\n- `writer(heapSize?)` - Get an IndexWriter\n- `searcher()` - Get a Searcher\n\n### `IndexWriter`\n\n- `addDocument(doc)` - Add a document (plain JS object)\n- `deleteByTerm(field, term)` - Delete documents matching term\n- `commit()` - Commit pending changes\n\n### `Searcher`\n\n- `search(query, fields, options?)` - Search the index\n\n## Platforms\n\nPrebuilt binaries are available for:\n- macOS (x64, arm64)\n- Linux (x64, arm64)\n\n## Building from Source\n\nRequirements:\n- Rust toolchain\n- Node.js 18+\n\n```bash\nnpm install\nnpm run build\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}