{"id":21339950,"url":"https://github.com/tigrisdata-archive/tigris-vector-ts","last_synced_at":"2025-07-01T10:32:47.942Z","repository":{"id":162404319,"uuid":"636966062","full_name":"tigrisdata-archive/tigris-vector-ts","owner":"tigrisdata-archive","description":"Tigris Vector Database client for TypeScript","archived":false,"fork":false,"pushed_at":"2023-05-09T19:04:58.000Z","size":100,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-05T11:02:07.084Z","etag":null,"topics":["database","javascript","nodejs","search","typescript","vector"],"latest_commit_sha":null,"homepage":"https://www.tigrisdata.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tigrisdata-archive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-06T05:22:38.000Z","updated_at":"2023-12-22T01:25:44.000Z","dependencies_parsed_at":"2023-12-29T05:03:44.134Z","dependency_job_id":"c096e5b7-4e12-4f81-85a4-c8c24c41c835","html_url":"https://github.com/tigrisdata-archive/tigris-vector-ts","commit_stats":null,"previous_names":["tigrisdata/tigris-vector-ts"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tigrisdata-archive/tigris-vector-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-vector-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-vector-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-vector-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-vector-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tigrisdata-archive","download_url":"https://codeload.github.com/tigrisdata-archive/tigris-vector-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigrisdata-archive%2Ftigris-vector-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260316508,"owners_count":22990953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","javascript","nodejs","search","typescript","vector"],"created_at":"2024-11-22T00:48:25.868Z","updated_at":"2025-07-01T10:32:47.917Z","avatar_url":"https://github.com/tigrisdata-archive.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tigris Vector Database Client Library for TypeScript\n\n[![build](https://github.com/tigrisdata/tigris-vector-ts/actions/workflows/ts-ci.yaml/badge.svg?branch=main)](https://github.com/tigrisdata/tigris-vector-ts/actions/workflows/ts-ci.yaml)\n[![codecov](https://codecov.io/gh/tigrisdata/tigris-vector-ts/branch/main/graph/badge.svg)](https://codecov.io/gh/tigrisdata/tigris-vector-ts)\n[![GitHub](https://img.shields.io/github/license/tigrisdata/tigris-vector-ts)](https://github.com/tigrisdata/tigris-vector-ts/blob/main/LICENSE)\n[![Discord](https://img.shields.io/discord/1033842669983633488?color=%23596fff\u0026label=Discord\u0026logo=discord\u0026logoColor=%23ffffff)](https://tigris.dev/discord)\n[![Twitter Follow](https://img.shields.io/twitter/follow/tigrisdata?style=social)](https://twitter.com/tigrisdata)\n\n# Getting Started\n\nTigris makes it easy to build AI applications with vector embeddings.\nIt is a fully managed cloud-native database that allows you store and index\ndocuments and vector embeddings for fast and scalable vector search.\n\n## 1. Install the client library\n\n```shell\nnpm install @tigrisdata/vector\n```\n\n## 2. Fetch Tigris API credentials\n\nYou can sign up for a free Tigris account [here](https://console.preview.tigrisdata.cloud/signup).\n\nOnce you have signed up for the Tigris account, create a new project called `vectordemo`.\nNext, make a note of the `clientId` and `clientSecret`, which you can get from the\n**Application Keys** section of the project.\n\n## 3. Create the Vector Database client\n\n```ts\nimport { VectorDocumentStore } from \"@tigrisdata/vector\";\n\nconst vectorDocStore = new VectorDocumentStore({\n  connection: {\n    serverUrl: \"api.preview.tigrisdata.cloud\",\n    projectName: \"vectordemo\",\n    clientId: \"clientId_here\",\n    clientSecret: \"clientSecret_here\",\n  },\n  indexName: \"my_index\",\n  numDimensions: 3,\n});\n```\n\nHere, we have created a new `VectorDocumentStore` instance that connects to the\nTigris Vector Database. The `indexName` is the name of the index that will store\nyour embeddings, documents, and any additional metadata. You can use any name\nyou like for the index. The `numDimensions` is the number of dimensions of the\nvector embeddings.\n\n## 4. Add documents to the index\n\n```ts\nawait vectorDocStore.addDocumentsWithVectors({\n  ids: [\"id1\", \"id2\"],\n  embeddings: [\n    [1.2, 2.3, 4.5],\n    [6.7, 8.2, 9.2],\n  ],\n  documents: [\n    {\n      content: \"This is a document\",\n      metadata: {\n        title: \"Document 1\",\n      },\n    },\n    {\n      content: \"This is another document\",\n      metadata: {\n        title: \"Document 2\",\n      },\n    },\n  ],\n});\n```\n\nHere, we have added two documents to the index. The `ids` are the unique\nidentifiers for the documents. The `embeddings` are the vector embeddings for\nthe documents. The `documents` are the actual documents that you want to store\nin the index. The `content` is the text content of the document. The `metadata`\nis any additional metadata that you want to store for the document.\n\n## 5. Query the index\n\nYou can query the index for the top `k` most similar documents to a given\nvector. It's that simple!\n\n```ts\nconst results = await vectorDocStore.similaritySearchVectorWithScore({\n  query: [1.0, 2.1, 3.2],\n  k: 10,\n});\nconsole.log(JSON.stringify(results, null, 2));\n```\n\n## 6. Enhance the query with attribute filtering\n\nYou can enhance the query with attribute filtering. For example, you can\nfilter the results by a given metadata field.\n\n```ts\nconst results2 = await vectorDocStore.similaritySearchVectorWithScore({\n  query: [1.0, 2.1, 3.2],\n  k: 10,\n  filter: {\n    \"metadata.title\": \"Document 1\",\n  },\n});\nconsole.log(JSON.stringify(results2, null, 2));\n```\n\n## Next Steps\n\nTigris Vector Database is simple enough to get started with, but powerful\nenough to build real-world applications.\n\nTigris provides the following features:\n\n- High performance: Tigris is built from the ground up to provide fast\n  vector search. It is optimized for low-latency vector search and high\n  throughput.\n- Real-time: Tigris provides real-time updates to the index. You can add,\n  update, and delete documents and embeddings in real-time.\n- Hybrid search: Tigris supports hybrid search, which allows you to\n  combine vector search with attribute filtering for more relevant search\n  results.\n- Fully managed: Tigris is a fully managed cloud-native database. You\n  can get started with Tigris in minutes and scale as needed with ease.\n\nCheck out the docs at [https://www.tigrisdata.com/docs/concepts/vector-search/](https://www.tigrisdata.com/docs/concepts/vector-search/).\n\n# Contributing\n\n## Building\n\n```\n\n# clean the dev env\n\nnpm run clean\n\n# build\n\nnpm run build\n\n# test\n\nnpm run test\n\n# lint\n\nnpm run lint\n\n```\n\n## Code Quality\n\n### 1. Linting\n\nThe coding style rules are defined by [Prettier](https://prettier.io/) and\nenforced by [Eslint](https://eslint.org)\n\n### 2. Git Hooks\n\nWe use [pre-commit](https://pre-commit.com/index.html) to automatically\nsetup and run git hooks.\n\nInstall the pre-commit hooks as follows:\n\n```shell\npre-commit install\n```\n\nOn every `git commit` we check the code quality using prettier and eslint.\n\n# License\n\nThis software is licensed under the [Apache 2.0](LICENSE).\n\n# Contributors\n\nThanks to all the people who contributed!\n\n\u003ca href=\"https://github.com/tigrisdata/tigris-vector-ts/graphs/contributors\"\u003e\n\t\u003cimg src=\"https://contrib.rocks/image?repo=tigrisdata/tigris-vector-ts\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigrisdata-archive%2Ftigris-vector-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigrisdata-archive%2Ftigris-vector-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigrisdata-archive%2Ftigris-vector-ts/lists"}