{"owner":"oramasearch","repo":"orama","hasSkills":true,"totalSkillsCount":19,"totalTokensCount":7208,"categories":["plugin-manifest"],"hasMcp":false,"mcpConfig":null,"found":["packages/orama/README.md","packages/plugin-analytics/README.md","packages/plugin-astro/README.md","packages/plugin-data-persistence/README.md","packages/plugin-docusaurus-v3/README.md","packages/plugin-docusaurus/README.md","packages/plugin-embeddings/README.md","packages/plugin-match-highlight/README.md","packages/plugin-nextra/README.md","packages/plugin-parsedoc/README.md","packages/plugin-pt15/README.md","packages/plugin-qps/README.md","packages/plugin-secure-proxy/README.md","packages/plugin-vitepress/README.md","packages/stemmers/README.md","packages/stemmers/lib/README.md","packages/stopwords/README.md","packages/switch/README.md","packages/tokenizers/README.md"],"skills":{"packages/orama/README.md":"<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/orama-readme-hero-light.png#gh-light-mode-only\" />\n</p>\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nIf you need more info, help, or want to provide general feedback on Orama, join the [Orama Slack channel](https://orama.to/slack)\n\n# Highlighted features\n\n- [Full-Text search](https://docs.orama.com/docs/orama-js/search)\n- [Vector Search](https://docs.orama.com/docs/orama-js/search/vector-search)\n- [Hybrid Search](https://docs.orama.com/docs/orama-js/search/hybrid-search)\n- [GenAI Chat Sessions](https://docs.orama.com/docs/orama-js/answer-engine)\n- [Search Filters](https://docs.orama.com/docs/orama-js/search/filters)\n- [Geosearch](https://docs.orama.com/docs/orama-js/search/geosearch)\n- [Pinning Rules (Merchandising)](https://docs.orama.com/docs/orama-js/results-pinning)\n- [Facets](https://docs.orama.com/docs/orama-js/search/facets)\n- [Fields Boosting](https://docs.orama.com/docs/orama-js/search/fields-boosting)\n- [Typo Tolerance](https://docs.orama.com/docs/orama-js/search#typo-tolerance)\n- [Exact Match](https://docs.orama.com/docs/orama-js/search#exact-match)\n- [BM25](https://docs.orama.com/docs/orama-js/search/bm25)\n- [Stemming and tokenization in 30 languages](https://docs.orama.com/docs/orama-js/text-analysis/stemming)\n- [Plugin System](https://docs.orama.com/docs/orama-js/plugins)\n\n# Installation\n\nYou can install Orama using `npm`, `yarn`, `pnpm`, `bun`:\n\n```sh\nnpm i @orama/orama\n```\n\nOr import it directly in a browser module:\n\n```html\n<html>\n  <body>\n    <script type=\"module\">\n      import { create, insert, search } from 'https://cdn.jsdelivr.net/npm/@orama/orama@latest/+esm'\n    </script>\n  </body>\n</html>\n```\n\nWith Deno, you can just use the same CDN URL or use npm specifiers:\n\n```js\nimport { create, search, insert } from 'npm:@orama/orama'\n```\n\nRead the complete documentation at [https://docs.orama.com](https://docs.orama.com).\n\n# Orama Features\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/features-light.png#gh-light-mode-only\" />\n</p>\n\n# Usage\n\nOrama is quite simple to use. The first thing to do is to create a new database\ninstance and set an indexing schema:\n\n```js\nimport { create, insert, remove, search, searchVector } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    name: 'string',\n    description: 'string',\n    price: 'number',\n    embedding: 'vector[1536]', // Vector size must be expressed during schema initialization\n    meta: {\n      rating: 'number',\n    },\n  },\n})\n\ninsert(db, {\n  name: 'Noise cancelling headphones',\n  description: 'Best noise cancelling headphones on the market',\n  price: 99.99,\n  embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n  meta: {\n    rating: 4.5\n  }\n})\n\nconst results = search(db, {\n  term: 'Best headphones'\n})\n\n// {\n//   elapsed: {\n//     raw: 21492,\n//     formatted: '21μs',\n//   },\n//   hits: [\n//     {\n//       id: '41013877-56',\n//       score: 0.925085832971998432,\n//       document: {\n//         name: 'Noise cancelling headphones',\n//         description: 'Best noise cancelling headphones on the market',\n//         price: 99.99,\n//         embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n//         meta: {\n//           rating: 4.5\n//         }\n//       }\n//     }\n//   ],\n//   count: 1\n// }\n```\n\nOrama currently supports 10 different data types:\n\n| Type             | Description                                                                 | Example                                                                     |\n| ---------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n| `string`         | A string of characters.                                                     | `'Hello world'`                                                             |\n| `number`         | A numeric value, either float or integer.                                   | `42`                                                                        |\n| `boolean`        | A boolean value.                                                            | `true`                                                                      |\n| `enum`           | An enum value.                                                              | `'drama'`                                                                   |\n| `geopoint`       | A geopoint value.                                                           | `{ lat: 40.7128, lon: 74.0060 }`                                            |\n| `string[]`       | An array of strings.                                                        | `['red', 'green', 'blue']`                                                  |\n| `number[]`       | An array of numbers.                                                        | `[42, 91, 28.5]`                                                            |\n| `boolean[]`      | An array of booleans.                                                       | `[true, false, false]`                                                      |\n| `enum[]`         | An array of enums.                                                          | `['comedy', 'action', 'romance']`                                           |\n| `vector[<size>]` | A vector of numbers to perform vector search on.                            | `[0.403, 0.192, 0.830]`                                                     |\n\n# Vector and Hybrid Search Support\n\nOrama supports both vector and hybrid search by just setting `mode: 'vector'` when performing search.\n\nTo perform this kind of search, you'll need to provide [text embeddings](https://en.wikipedia.org/wiki/Word_embedding) at search time:\n\n```js\nimport { create, insertMultiple, search } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    title: 'string',\n    embedding: 'vector[5]'', // we are using a 5-dimensional vector.\n  },\n});\n\ninsertMultiple(db, [\n  { title: 'The Prestige', embedding: [0.938293, 0.284951, 0.348264, 0.948276, 0.56472] },\n  { title: 'Barbie', embedding: [0.192839, 0.028471, 0.284738, 0.937463, 0.092827] },\n  { title: 'Oppenheimer', embedding: [0.827391, 0.927381, 0.001982, 0.983821, 0.294841] },\n])\n\nconst results = search(db, {\n  // Search mode. Can be 'vector', 'hybrid', or 'fulltext'\n  mode: 'vector',\n  vector: {\n    // The vector (text embedding) to use for search\n    value: [0.938292, 0.284961, 0.248264, 0.748276, 0.26472],\n    // The schema property where Orama should compare embeddings\n    property: 'embedding',\n  },\n  // Minimum similarity to determine a match. Defaults to `0.8`\n  similarity: 0.85,\n  // Defaults to `false`. Setting to 'true' will return the embeddings in the response (which can be very large).\n  includeVectors: true,\n})\n```\n\nHave trouble generating embeddings for vector and hybrid search? Try our `@orama/plugin-embeddings` plugin!\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend, like @tensorflow/tfjs-backend-webgl\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    // Schema property used to store generated embeddings\n    defaultProperty: 'embeddings',\n    onInsert: {\n      // Generate embeddings at insert-time\n      generate: true,\n      // properties to use for generating embeddings at insert time.\n      // Will be concatenated to generate a unique embedding.\n      properties: ['description'],\n      verbose: true,\n    }\n  }\n})\n\nconst db = create({\n  schema: {\n    description: 'string',\n    // Orama generates 512-dimensions vectors.\n    // When using @orama/plugin-embeddings, set the property where you want to store embeddings as `vector[512]`.\n    embeddings: 'vector[512]'\n  },\n  plugins: [plugin]\n})\n\n// Orama will generate and store embeddings at insert-time!\nawait insert(db, { description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties' })\nawait insert(db, { description: 'Kids Wired Headphones for School Students K-12' })\nawait insert(db, { description: 'Kids Headphones Bulk 5-Pack for K-12 School' })\nawait insert(db, { description: 'Bose QuietComfort Bluetooth Headphones' })\n\n// Orama will also generate and use embeddings at search time when search mode is set to \"vector\" or \"hybrid\"!\nconst searchResults = await search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nWant to use OpenAI embedding models? Use our [Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) plugin to call OpenAI from the client-side securely.\n\n# RAG and Chat Experiences with Orama\n\nSince `v3.0.0`, Orama allows you to create your own ChatGPT/Perplexity/SearchGPT-like experience. You will need to call the OpenAI APIs, so we strongly recommend using the [Secure Proxy Plugin](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) to do that securely from your client side. It's free!\n\n```js\nimport { create, insert } from '@orama/orama'\nimport { pluginSecureProxy } from '@orama/plugin-secure-proxy'\n\nconst secureProxy = await pluginSecureProxy({\n  apiKey: 'my-api-key',\n  defaultProperty: 'embeddings',\n  models: {\n    // The chat model to use to generate the chat answer\n    chat: 'openai/gpt-4o-mini'\n  }\n})\n\nconst db = create({\n  schema: {\n    name: 'string'\n  },\n  plugins: [secureProxy]\n})\n\ninsert(db, { name: 'John Doe' })\ninsert(db, { name: 'Jane Doe' })\n\nconst session = new AnswerSession(db, {\n  // Customize the prompt for the system\n  systemPrompt: 'You will get a name as context, please provide a greeting message',\n  events: {\n    // Log all state changes. Useful to reactively update a UI on a new message chunk, sources, etc.\n    onStateChange: console.log,\n  }\n})\n\nconst response = await session.ask({\n  term: 'john'\n})\n\nconsole.log(response) // Hello, John Doe! How are you doing?\n```\n\nRead the complete documentation [here](https://docs.orama.com/docs/orama-js/usage/answer-engine/introduction).\n\n# Official Docs\n\nRead the complete documentation at [https://docs.orama.com/open-source](https://docs.orama.com/open-source).\n\n# Official Orama Plugins\n\n- [Plugin Embeddings](https://docs.orama.com/docs/orama-js/plugins/plugin-embeddings)\n- [Plugin Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy)\n- [Plugin Analytics](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics)\n- [Plugin Data Persistence](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence)\n- [Plugin QPS](https://docs.orama.com/docs/orama-js/plugins/plugin-qps)\n- [Plugin PT15](https://docs.orama.com/docs/orama-js/plugins/plugin-pt15)\n- [Plugin Vitepress](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress)\n- [Plugin Docusaurus](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n- [Plugin Astro](https://docs.orama.com/docs/orama-js/plugins/plugin-astro)\n- [Plugin Nextra](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra)\n\nWrite your own plugin: [https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins](https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins)\n\n# License\n\nOrama is licensed under the [Apache 2.0](/LICENSE.md) license.\n\n<img referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=fb0c2057-e709-49a9-b634-cf90bdfb2dbd\" />","packages/plugin-analytics/README.md":"# Orama Analytics Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide analytics data on your searches.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\nTo use the Orama Analytics Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginAnalytics} from '@orama/plugin-analytics'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string'\n  },\n  plugins: [\n    pluginAnalytics({\n      apiKey: '<API-KEY>',\n      endpoint: '<ENDPOINT>'\n    })\n  ]\n})\n```\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-astro/README.md":"# Orama's Astro Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis package is a (still experimental) [Orama](https://oramasearch.com) integration for\n[Astro](https://astro.build).\n\n## Usage\n\n### Configuring the Astro integration\n\n```typescript\n// In `astro.config.mjs`\nimport orama from '@orama/plugin-astro'\n\n// https://astro.build/config\nexport default defineConfig({\n  integrations: [\n    orama({\n      // We can generate more than one DB, with different configurations\n      mydb: {\n        // Required. Only pages matching this path regex will be indexed\n        pathMatcher: /blog\\/[0-9]{4}\\/[0-9]{2}\\/[0-9]{2}\\/.+$/,\n\n        // Optional. 'english' by default\n        language: 'spanish',\n\n        // Optional. ['body'] by default. Use it to constraint what is used to\n        // index a page.\n        contentSelectors: ['h1', 'main']\n      }\n    })\n  ]\n})\n```\n\nWhen running the `astro build` command, a new DB file will be persisted in the\n`dist/assets` directory. For the particular case of this example, it will be\nsaved in the file `dist/assets/oramaDB_mydb.json`.\n\n### Using generated DBs in your pages\n\nTo use the generated DBs in your pages, you can include a script in your\n`<head>` section, as the following one:\n\n```html\n<head>\n  <!-- Other stuff -->\n  <script>\n    // Astro will do the job of bundling everything for you\n    import { getOramaDB, search } from \"@orama/plugin-astro/client\"\n\n    // We load the DB that we generated at build time, this is an asynchronous\n    // operation, so we must either await, or rely on `.then` calls.\n    const db = await getOramaDB('mydb')\n\n    // Now we can search inside our DB. Of course, feel free to use it in more\n    // interesting ways.\n    console.log('Search Results')\n    console.log(search(db, { term: 'mySearchTerm' }))\n  </script>\n</head>\n```\n\n**NOTE:** For now, this plugin only supports readonly DBs. This might change in\nthe future if there's demand for it.\n","packages/plugin-data-persistence/README.md":"# Data Persistence Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to provide data persistence capabilities to Orama.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-docusaurus-v3/README.md":"# Orama Plugin for Docusaurus v3\n\n[Plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n\n## Local Development\n\nTo test the plugin locally, follow these steps:\n\n### (Required only if using workspace dependencies):\nReplace all the `workspace:*` packages with the latest version of the package.\n\n#### Steps:\n1. Add a link to the plugin in your Docusaurus project:\n\n```bash\n\"dependencies\": {\n  \"@orama/plugin-docusaurus\": \"file:../path/to/plugin\"\n}\n```\n2. Install the plugin:\n\n```bash\npnpm install\n```\n\n3. Start your Plugin project (plugin folder):\n\n```bash\npnpm run watch\n```\n\n4. Copy the needed CSS files into dist folder:\n```bash\npnpm run postbuild\n```\n\n5. Start your Docusaurus project:\n\n```bash\npnpm start\n```\n\nThe Docusaurus project will watch automatically for changes in the plugin, so you can edit the plugin and see the changes in real-time.\n\n### Other information\n- The Answer Session will not work while working on Staging due to the answer session url being hard-corded to production. To test it please, use prod environment.\n\n\nFor Docusaurus v2, please refer to the [v2 branch.](https://www.npmjs.com/package/@orama/plugin-docusaurus)\n","packages/plugin-docusaurus/README.md":"# Orama plugin for Docusaurus v2\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\n## Pre-requisites\nIn order guarantee a correct functionality of the plugin, you need to have the `@docusaurus/core` at least in the version `2.4.3`.\n\n| :warning: This plugin do not support Docusaurus v3. Use [`@orama/plugin-docusaurus-v3`](https://www.npmjs.com/package/@orama/plugin-docusaurus-v3) instead. |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n## Usage\n\nInstall the plugin:\n\n```bash\nnpm install --save @orama/plugin-docusaurus\n```\n\n```bash\nyarn add @orama/plugin-docusaurus\n```\n\nAdd the plugin to your `docusaurus.config.js`:\n\n```js\nplugins: ['@orama/plugin-docusaurus']\n```\n\n# License\n\nLicensed under the [Apache 2.0](/LICENSE.md) license.\n","packages/plugin-embeddings/README.md":"# Orama Plugin Embeddings\n\n**Orama Plugin Embeddings** allows you to generate fast text embeddings at insert and search time offline, directly on your machine - no OpenAI needed!\n\n## Installation\n\nTo get started with **Orama Plugin Embeddings**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-embeddings\n```\n\n**Important note**: to use this plugin, you'll also need to install one of the following TensorflowJS backend:\n\n- `@tensorflow/tfjs`\n- `@tensorflow/tfjs-node`\n- `@tensorflow/tfjs-backend-webgl`\n- `@tensorflow/tfjs-backend-cpu`\n- `@tensorflow/tfjs-node-gpu`\n- `@tensorflow/tfjs-backend-wasm`\n\nFor example, if you're running Orama on the browser, we highly recommend using `@tensorflow/tfjs-backend-webgl`:\n\n```sh\nnpm i @tensorflow/tfjs-backend-webgl\n```\n\nIf you're using Orama in Node.js, we recommend using `@tensorflow/tfjs-node`:\n\n```sh\nnpm i @tensorflow/tfjs-node\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    defaultProperty: 'embeddings', // Property used to store generated embeddings\n    onInsert: {\n      generate: true, // Generate embeddings at insert-time\n      properties: ['description'], // properties to use for generating embeddings at insert time\n      verbose: true,\n    }\n  }\n})\n\nconst db = await create({\n  schema: {\n    description: 'string',\n    embeddings: 'vector[512]' // Orama generates 512-dimensions vectors\n  },\n  plugins: [plugin]\n})\n```\n\nExample usage at insert time:\n\n```js\nawait insert(db, {\n  description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties'\n})\n\nawait insert(db, {\n  description: 'Kids Wired Headphones for School Students K-12'\n})\n\nawait insert(db, {\n  description: 'Kids Headphones Bulk 5-Pack for K-12 School'\n})\n\nawait insert(db, {\n  description: 'Bose QuietComfort Bluetooth Headphones'\n})\n```\n\nOrama will automatically generate text embeddings and store them into the `embeddings` property.\n\nThen, you can use the `vector` or `hybrid` setting to perform hybrid or vector search at runtime:\n\n```js\nawait search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nOrama will generate embeddings at search time and perform vector or hybrid search for you.\n\n# License\n\n[Apache 2.0](/LICENSE.md)","packages/plugin-match-highlight/README.md":"# Match Highlight Plugin - DEPRECATED\n\nThis plugin is deprecated in favor of [Orama Highlight](https://www.npmjs.com/package/@orama/highlight). It's faster, easier to use, and with a minimal memory footprint. Give it a try! \n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-nextra/README.md":"# Nextra Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Nextra website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-parsedoc/README.md":"# Parsedoc Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to generate an index for Orama from HTML files\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-parsedoc).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-pt15/README.md":"# Orama Plugin PT15\n\nFast ranking algorithm based on token position.\n\n## Installation\n\nTo get started with **Orama Plugin PT15**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-pt15\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginPT15 } from '@orama/plugin-pt15'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginPT15() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)","packages/plugin-qps/README.md":"# Orama Plugin Quantum Proximity Scoring\n\n**Orama Plugin Quantum Proximity Scoring** ranks search results based on the proximity of query tokens in the document.\n\n## Installation\n\nTo get started with **Orama Plugin QPS**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-qps\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginQPS } from '@orama/plugin-qps'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginQPS() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)","packages/plugin-secure-proxy/README.md":"# Orama Secure Proxy Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOrama plugin for generating embeddings and performing vector/hybrid search securely on the front-end.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\nTo use the Orama Secure Proxy Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginSecureProxy} from '@orama/plugin-secure-proxy'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string',\n    embeddings: 'vector[384]'\n  },\n  plugins: [\n    pluginSecureProxy({\n      apiKey: 'xyz',\n      embeddings: {\n        defaultProperty: 'embeddings',\n        model: 'orama/gte-small',\n        onInsert: {\n          generate: true, // Generate the embeddings at insert-time\n          properties: ['title', 'description'], // Properties to generate embeddings from\n          verbose: false\n        },\n      },\n      chat: {\n        model: 'openai/gpt-4o'\n      }\n    })\n  ]\n})\n```\n\nAvailable **embeddings** models:\n\n| Model name                       | Provider | Dimensions |\n| -------------------------------- | -------- | ---------- |\n| `orama/gte-small`                | Orama    | 384        |\n| `orama/gte-medium`               | Orama    | 768        |\n| `orama/gte-large`                | Orama    | 1024       |\n| `openai/text-embedding-ada-002`  | Openai   | 1536       |\n| `openai/text-embedding-3-small`  | Openai   | 1536       |\n| `openai/text-embedding-3-large`  | Openai   | 3072       |\n\nAvailable **chat** models:\n\n| Model name                       | Provider |\n| -------------------------------- | -------- |\n| `openai/openai/gpt-4o`           | Openai   |\n| `openai/gpt-4o-mini`             | Openai   |\n| `openai/gpt-4-turbo`             | Openai   |\n| `openai/gpt-4`                   | Openai   |\n| `openai/gpt-3.5-turbo`           | Openai   |\n\nMode models coming soon!\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-vitepress/README.md":"# Vitepress Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Vitepress website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress).\n\n# TL;DR\n\n```js\n// .vitepress/config.js\n\nimport { defineConfig } from 'vitepress'\nimport { OramaPlugin } from '@orama/plugin-vitepress'\n\nexport default defineConfig({\n  // ...\n  extends: {\n    vite: {\n      plugins: [OramaPlugin()]\n    },\n  }\n})\n```\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/stemmers/README.md":"# Orama Stemmers\n\nOrama can analyze the input and perform a `stemming` operation, which allows the engine to perform more optimized queries, as well as save indexing space.\n\n<!-- LANGUAGES:START -->\nRight now, Orama supports 31 languages and stemmers out of the box:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\nChinese (Mandarin) and Japanese are supported through dedicated tokenizers (`@orama/tokenizers`) and stop-word removal (`@orama/stopwords`), not through stemming.\n\n```js\nimport { create } from '@orama/orama'\nimport { stemmer, language } from '@orama/stemmers/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stemming: true,\n      stemmer,\n      language\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stemming](https://docs.orama.com/docs/orama-js/text-analysis/stemming).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n","packages/stemmers/lib/README.md":"# Snowball Stemmer\n\nThis directory contains **generated** stemmers using the\n[Snowball](http://snowballstem.org/) compiler.\n\nDo not edit these files directly.\n","packages/stopwords/README.md":"# Orama Stop-words\n\n<!-- LANGUAGES:START -->\nThis package provides support for stop-words removal in 33 languages:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Chinese (Mandarin)\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Japanese\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\n```js\nimport { create } from '@orama/orama'\nimport { stopwords as italianStopwords } from '@orama/stopwords/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stopwords: italianStopwords\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stop-words](https://docs.orama.com/docs/orama-js/text-analysis/stop-words).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n","packages/switch/README.md":"# Orama Switch\n\nOrama Switch allows you to run queries on Orama Cloud and OSS with a single interface.\n\n## Installation\n\n```sh\nnpm i @orama/switch\n```\n\n## Usage\n\nYou can use the same APIs to access either Orama Cloud or Orama OSS.\n\nFor instance, this is how you would interact with Orama Cloud:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { OramaClient } from '@oramacloud/client'\n\nconst client = new OramaClient({\n  endpoint: '<Your Orama Cloud Endpoint>',\n  api_key: '<Your Orama Cloud API Key>',\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\nAnd this is Orama OSS:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { create } from '@orama/orama'\n\nconst db = await create({\n  schema: {\n    productName: 'string',\n    price: 'number'\n  }\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\n## License\n\n[Apache 2.0](/LICENSE.md)","packages/tokenizers/README.md":"# Orama Tokenizers\n\nThis package provides support for additional tokenizers for the Orama Search Engine.\n\nAvailable tokenizers:\n\n- Chinese (Mandarin, experimental)\n- Japanese (experimental)\n- Korean (experimental)\n\nUsage:\n\n```js\nimport { create } from \"@orama/orama\";\nimport { createTokenizer } from \"@orama/tokenizers/mandarin\";\n\nconst db = await create({\n  schema: {\n    myProperty: \"string\",\n    anotherProperty: \"number\",\n  },\n  components: {\n    tokenizer: await createTokenizer(),\n  },\n});\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n"},"files":{"packages/orama/README.md":"<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/orama-readme-hero-light.png#gh-light-mode-only\" />\n</p>\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nIf you need more info, help, or want to provide general feedback on Orama, join the [Orama Slack channel](https://orama.to/slack)\n\n# Highlighted features\n\n- [Full-Text search](https://docs.orama.com/docs/orama-js/search)\n- [Vector Search](https://docs.orama.com/docs/orama-js/search/vector-search)\n- [Hybrid Search](https://docs.orama.com/docs/orama-js/search/hybrid-search)\n- [GenAI Chat Sessions](https://docs.orama.com/docs/orama-js/answer-engine)\n- [Search Filters](https://docs.orama.com/docs/orama-js/search/filters)\n- [Geosearch](https://docs.orama.com/docs/orama-js/search/geosearch)\n- [Pinning Rules (Merchandising)](https://docs.orama.com/docs/orama-js/results-pinning)\n- [Facets](https://docs.orama.com/docs/orama-js/search/facets)\n- [Fields Boosting](https://docs.orama.com/docs/orama-js/search/fields-boosting)\n- [Typo Tolerance](https://docs.orama.com/docs/orama-js/search#typo-tolerance)\n- [Exact Match](https://docs.orama.com/docs/orama-js/search#exact-match)\n- [BM25](https://docs.orama.com/docs/orama-js/search/bm25)\n- [Stemming and tokenization in 30 languages](https://docs.orama.com/docs/orama-js/text-analysis/stemming)\n- [Plugin System](https://docs.orama.com/docs/orama-js/plugins)\n\n# Installation\n\nYou can install Orama using `npm`, `yarn`, `pnpm`, `bun`:\n\n```sh\nnpm i @orama/orama\n```\n\nOr import it directly in a browser module:\n\n```html\n<html>\n  <body>\n    <script type=\"module\">\n      import { create, insert, search } from 'https://cdn.jsdelivr.net/npm/@orama/orama@latest/+esm'\n    </script>\n  </body>\n</html>\n```\n\nWith Deno, you can just use the same CDN URL or use npm specifiers:\n\n```js\nimport { create, search, insert } from 'npm:@orama/orama'\n```\n\nRead the complete documentation at [https://docs.orama.com](https://docs.orama.com).\n\n# Orama Features\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/features-light.png#gh-light-mode-only\" />\n</p>\n\n# Usage\n\nOrama is quite simple to use. The first thing to do is to create a new database\ninstance and set an indexing schema:\n\n```js\nimport { create, insert, remove, search, searchVector } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    name: 'string',\n    description: 'string',\n    price: 'number',\n    embedding: 'vector[1536]', // Vector size must be expressed during schema initialization\n    meta: {\n      rating: 'number',\n    },\n  },\n})\n\ninsert(db, {\n  name: 'Noise cancelling headphones',\n  description: 'Best noise cancelling headphones on the market',\n  price: 99.99,\n  embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n  meta: {\n    rating: 4.5\n  }\n})\n\nconst results = search(db, {\n  term: 'Best headphones'\n})\n\n// {\n//   elapsed: {\n//     raw: 21492,\n//     formatted: '21μs',\n//   },\n//   hits: [\n//     {\n//       id: '41013877-56',\n//       score: 0.925085832971998432,\n//       document: {\n//         name: 'Noise cancelling headphones',\n//         description: 'Best noise cancelling headphones on the market',\n//         price: 99.99,\n//         embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n//         meta: {\n//           rating: 4.5\n//         }\n//       }\n//     }\n//   ],\n//   count: 1\n// }\n```\n\nOrama currently supports 10 different data types:\n\n| Type             | Description                                                                 | Example                                                                     |\n| ---------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n| `string`         | A string of characters.                                                     | `'Hello world'`                                                             |\n| `number`         | A numeric value, either float or integer.                                   | `42`                                                                        |\n| `boolean`        | A boolean value.                                                            | `true`                                                                      |\n| `enum`           | An enum value.                                                              | `'drama'`                                                                   |\n| `geopoint`       | A geopoint value.                                                           | `{ lat: 40.7128, lon: 74.0060 }`                                            |\n| `string[]`       | An array of strings.                                                        | `['red', 'green', 'blue']`                                                  |\n| `number[]`       | An array of numbers.                                                        | `[42, 91, 28.5]`                                                            |\n| `boolean[]`      | An array of booleans.                                                       | `[true, false, false]`                                                      |\n| `enum[]`         | An array of enums.                                                          | `['comedy', 'action', 'romance']`                                           |\n| `vector[<size>]` | A vector of numbers to perform vector search on.                            | `[0.403, 0.192, 0.830]`                                                     |\n\n# Vector and Hybrid Search Support\n\nOrama supports both vector and hybrid search by just setting `mode: 'vector'` when performing search.\n\nTo perform this kind of search, you'll need to provide [text embeddings](https://en.wikipedia.org/wiki/Word_embedding) at search time:\n\n```js\nimport { create, insertMultiple, search } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    title: 'string',\n    embedding: 'vector[5]'', // we are using a 5-dimensional vector.\n  },\n});\n\ninsertMultiple(db, [\n  { title: 'The Prestige', embedding: [0.938293, 0.284951, 0.348264, 0.948276, 0.56472] },\n  { title: 'Barbie', embedding: [0.192839, 0.028471, 0.284738, 0.937463, 0.092827] },\n  { title: 'Oppenheimer', embedding: [0.827391, 0.927381, 0.001982, 0.983821, 0.294841] },\n])\n\nconst results = search(db, {\n  // Search mode. Can be 'vector', 'hybrid', or 'fulltext'\n  mode: 'vector',\n  vector: {\n    // The vector (text embedding) to use for search\n    value: [0.938292, 0.284961, 0.248264, 0.748276, 0.26472],\n    // The schema property where Orama should compare embeddings\n    property: 'embedding',\n  },\n  // Minimum similarity to determine a match. Defaults to `0.8`\n  similarity: 0.85,\n  // Defaults to `false`. Setting to 'true' will return the embeddings in the response (which can be very large).\n  includeVectors: true,\n})\n```\n\nHave trouble generating embeddings for vector and hybrid search? Try our `@orama/plugin-embeddings` plugin!\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend, like @tensorflow/tfjs-backend-webgl\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    // Schema property used to store generated embeddings\n    defaultProperty: 'embeddings',\n    onInsert: {\n      // Generate embeddings at insert-time\n      generate: true,\n      // properties to use for generating embeddings at insert time.\n      // Will be concatenated to generate a unique embedding.\n      properties: ['description'],\n      verbose: true,\n    }\n  }\n})\n\nconst db = create({\n  schema: {\n    description: 'string',\n    // Orama generates 512-dimensions vectors.\n    // When using @orama/plugin-embeddings, set the property where you want to store embeddings as `vector[512]`.\n    embeddings: 'vector[512]'\n  },\n  plugins: [plugin]\n})\n\n// Orama will generate and store embeddings at insert-time!\nawait insert(db, { description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties' })\nawait insert(db, { description: 'Kids Wired Headphones for School Students K-12' })\nawait insert(db, { description: 'Kids Headphones Bulk 5-Pack for K-12 School' })\nawait insert(db, { description: 'Bose QuietComfort Bluetooth Headphones' })\n\n// Orama will also generate and use embeddings at search time when search mode is set to \"vector\" or \"hybrid\"!\nconst searchResults = await search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nWant to use OpenAI embedding models? Use our [Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) plugin to call OpenAI from the client-side securely.\n\n# RAG and Chat Experiences with Orama\n\nSince `v3.0.0`, Orama allows you to create your own ChatGPT/Perplexity/SearchGPT-like experience. You will need to call the OpenAI APIs, so we strongly recommend using the [Secure Proxy Plugin](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) to do that securely from your client side. It's free!\n\n```js\nimport { create, insert } from '@orama/orama'\nimport { pluginSecureProxy } from '@orama/plugin-secure-proxy'\n\nconst secureProxy = await pluginSecureProxy({\n  apiKey: 'my-api-key',\n  defaultProperty: 'embeddings',\n  models: {\n    // The chat model to use to generate the chat answer\n    chat: 'openai/gpt-4o-mini'\n  }\n})\n\nconst db = create({\n  schema: {\n    name: 'string'\n  },\n  plugins: [secureProxy]\n})\n\ninsert(db, { name: 'John Doe' })\ninsert(db, { name: 'Jane Doe' })\n\nconst session = new AnswerSession(db, {\n  // Customize the prompt for the system\n  systemPrompt: 'You will get a name as context, please provide a greeting message',\n  events: {\n    // Log all state changes. Useful to reactively update a UI on a new message chunk, sources, etc.\n    onStateChange: console.log,\n  }\n})\n\nconst response = await session.ask({\n  term: 'john'\n})\n\nconsole.log(response) // Hello, John Doe! How are you doing?\n```\n\nRead the complete documentation [here](https://docs.orama.com/docs/orama-js/usage/answer-engine/introduction).\n\n# Official Docs\n\nRead the complete documentation at [https://docs.orama.com/open-source](https://docs.orama.com/open-source).\n\n# Official Orama Plugins\n\n- [Plugin Embeddings](https://docs.orama.com/docs/orama-js/plugins/plugin-embeddings)\n- [Plugin Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy)\n- [Plugin Analytics](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics)\n- [Plugin Data Persistence](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence)\n- [Plugin QPS](https://docs.orama.com/docs/orama-js/plugins/plugin-qps)\n- [Plugin PT15](https://docs.orama.com/docs/orama-js/plugins/plugin-pt15)\n- [Plugin Vitepress](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress)\n- [Plugin Docusaurus](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n- [Plugin Astro](https://docs.orama.com/docs/orama-js/plugins/plugin-astro)\n- [Plugin Nextra](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra)\n\nWrite your own plugin: [https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins](https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins)\n\n# License\n\nOrama is licensed under the [Apache 2.0](/LICENSE.md) license.\n\n<img referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=fb0c2057-e709-49a9-b634-cf90bdfb2dbd\" />","packages/plugin-analytics/README.md":"# Orama Analytics Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide analytics data on your searches.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\nTo use the Orama Analytics Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginAnalytics} from '@orama/plugin-analytics'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string'\n  },\n  plugins: [\n    pluginAnalytics({\n      apiKey: '<API-KEY>',\n      endpoint: '<ENDPOINT>'\n    })\n  ]\n})\n```\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-astro/README.md":"# Orama's Astro Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis package is a (still experimental) [Orama](https://oramasearch.com) integration for\n[Astro](https://astro.build).\n\n## Usage\n\n### Configuring the Astro integration\n\n```typescript\n// In `astro.config.mjs`\nimport orama from '@orama/plugin-astro'\n\n// https://astro.build/config\nexport default defineConfig({\n  integrations: [\n    orama({\n      // We can generate more than one DB, with different configurations\n      mydb: {\n        // Required. Only pages matching this path regex will be indexed\n        pathMatcher: /blog\\/[0-9]{4}\\/[0-9]{2}\\/[0-9]{2}\\/.+$/,\n\n        // Optional. 'english' by default\n        language: 'spanish',\n\n        // Optional. ['body'] by default. Use it to constraint what is used to\n        // index a page.\n        contentSelectors: ['h1', 'main']\n      }\n    })\n  ]\n})\n```\n\nWhen running the `astro build` command, a new DB file will be persisted in the\n`dist/assets` directory. For the particular case of this example, it will be\nsaved in the file `dist/assets/oramaDB_mydb.json`.\n\n### Using generated DBs in your pages\n\nTo use the generated DBs in your pages, you can include a script in your\n`<head>` section, as the following one:\n\n```html\n<head>\n  <!-- Other stuff -->\n  <script>\n    // Astro will do the job of bundling everything for you\n    import { getOramaDB, search } from \"@orama/plugin-astro/client\"\n\n    // We load the DB that we generated at build time, this is an asynchronous\n    // operation, so we must either await, or rely on `.then` calls.\n    const db = await getOramaDB('mydb')\n\n    // Now we can search inside our DB. Of course, feel free to use it in more\n    // interesting ways.\n    console.log('Search Results')\n    console.log(search(db, { term: 'mySearchTerm' }))\n  </script>\n</head>\n```\n\n**NOTE:** For now, this plugin only supports readonly DBs. This might change in\nthe future if there's demand for it.\n","packages/plugin-data-persistence/README.md":"# Data Persistence Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to provide data persistence capabilities to Orama.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-docusaurus-v3/README.md":"# Orama Plugin for Docusaurus v3\n\n[Plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n\n## Local Development\n\nTo test the plugin locally, follow these steps:\n\n### (Required only if using workspace dependencies):\nReplace all the `workspace:*` packages with the latest version of the package.\n\n#### Steps:\n1. Add a link to the plugin in your Docusaurus project:\n\n```bash\n\"dependencies\": {\n  \"@orama/plugin-docusaurus\": \"file:../path/to/plugin\"\n}\n```\n2. Install the plugin:\n\n```bash\npnpm install\n```\n\n3. Start your Plugin project (plugin folder):\n\n```bash\npnpm run watch\n```\n\n4. Copy the needed CSS files into dist folder:\n```bash\npnpm run postbuild\n```\n\n5. Start your Docusaurus project:\n\n```bash\npnpm start\n```\n\nThe Docusaurus project will watch automatically for changes in the plugin, so you can edit the plugin and see the changes in real-time.\n\n### Other information\n- The Answer Session will not work while working on Staging due to the answer session url being hard-corded to production. To test it please, use prod environment.\n\n\nFor Docusaurus v2, please refer to the [v2 branch.](https://www.npmjs.com/package/@orama/plugin-docusaurus)\n","packages/plugin-docusaurus/README.md":"# Orama plugin for Docusaurus v2\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\n## Pre-requisites\nIn order guarantee a correct functionality of the plugin, you need to have the `@docusaurus/core` at least in the version `2.4.3`.\n\n| :warning: This plugin do not support Docusaurus v3. Use [`@orama/plugin-docusaurus-v3`](https://www.npmjs.com/package/@orama/plugin-docusaurus-v3) instead. |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n## Usage\n\nInstall the plugin:\n\n```bash\nnpm install --save @orama/plugin-docusaurus\n```\n\n```bash\nyarn add @orama/plugin-docusaurus\n```\n\nAdd the plugin to your `docusaurus.config.js`:\n\n```js\nplugins: ['@orama/plugin-docusaurus']\n```\n\n# License\n\nLicensed under the [Apache 2.0](/LICENSE.md) license.\n","packages/plugin-embeddings/README.md":"# Orama Plugin Embeddings\n\n**Orama Plugin Embeddings** allows you to generate fast text embeddings at insert and search time offline, directly on your machine - no OpenAI needed!\n\n## Installation\n\nTo get started with **Orama Plugin Embeddings**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-embeddings\n```\n\n**Important note**: to use this plugin, you'll also need to install one of the following TensorflowJS backend:\n\n- `@tensorflow/tfjs`\n- `@tensorflow/tfjs-node`\n- `@tensorflow/tfjs-backend-webgl`\n- `@tensorflow/tfjs-backend-cpu`\n- `@tensorflow/tfjs-node-gpu`\n- `@tensorflow/tfjs-backend-wasm`\n\nFor example, if you're running Orama on the browser, we highly recommend using `@tensorflow/tfjs-backend-webgl`:\n\n```sh\nnpm i @tensorflow/tfjs-backend-webgl\n```\n\nIf you're using Orama in Node.js, we recommend using `@tensorflow/tfjs-node`:\n\n```sh\nnpm i @tensorflow/tfjs-node\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    defaultProperty: 'embeddings', // Property used to store generated embeddings\n    onInsert: {\n      generate: true, // Generate embeddings at insert-time\n      properties: ['description'], // properties to use for generating embeddings at insert time\n      verbose: true,\n    }\n  }\n})\n\nconst db = await create({\n  schema: {\n    description: 'string',\n    embeddings: 'vector[512]' // Orama generates 512-dimensions vectors\n  },\n  plugins: [plugin]\n})\n```\n\nExample usage at insert time:\n\n```js\nawait insert(db, {\n  description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties'\n})\n\nawait insert(db, {\n  description: 'Kids Wired Headphones for School Students K-12'\n})\n\nawait insert(db, {\n  description: 'Kids Headphones Bulk 5-Pack for K-12 School'\n})\n\nawait insert(db, {\n  description: 'Bose QuietComfort Bluetooth Headphones'\n})\n```\n\nOrama will automatically generate text embeddings and store them into the `embeddings` property.\n\nThen, you can use the `vector` or `hybrid` setting to perform hybrid or vector search at runtime:\n\n```js\nawait search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nOrama will generate embeddings at search time and perform vector or hybrid search for you.\n\n# License\n\n[Apache 2.0](/LICENSE.md)","packages/plugin-match-highlight/README.md":"# Match Highlight Plugin - DEPRECATED\n\nThis plugin is deprecated in favor of [Orama Highlight](https://www.npmjs.com/package/@orama/highlight). It's faster, easier to use, and with a minimal memory footprint. Give it a try! \n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-nextra/README.md":"# Nextra Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Nextra website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-parsedoc/README.md":"# Parsedoc Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to generate an index for Orama from HTML files\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-parsedoc).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-pt15/README.md":"# Orama Plugin PT15\n\nFast ranking algorithm based on token position.\n\n## Installation\n\nTo get started with **Orama Plugin PT15**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-pt15\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginPT15 } from '@orama/plugin-pt15'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginPT15() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)","packages/plugin-qps/README.md":"# Orama Plugin Quantum Proximity Scoring\n\n**Orama Plugin Quantum Proximity Scoring** ranks search results based on the proximity of query tokens in the document.\n\n## Installation\n\nTo get started with **Orama Plugin QPS**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-qps\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginQPS } from '@orama/plugin-qps'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginQPS() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)","packages/plugin-secure-proxy/README.md":"# Orama Secure Proxy Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOrama plugin for generating embeddings and performing vector/hybrid search securely on the front-end.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\nTo use the Orama Secure Proxy Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginSecureProxy} from '@orama/plugin-secure-proxy'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string',\n    embeddings: 'vector[384]'\n  },\n  plugins: [\n    pluginSecureProxy({\n      apiKey: 'xyz',\n      embeddings: {\n        defaultProperty: 'embeddings',\n        model: 'orama/gte-small',\n        onInsert: {\n          generate: true, // Generate the embeddings at insert-time\n          properties: ['title', 'description'], // Properties to generate embeddings from\n          verbose: false\n        },\n      },\n      chat: {\n        model: 'openai/gpt-4o'\n      }\n    })\n  ]\n})\n```\n\nAvailable **embeddings** models:\n\n| Model name                       | Provider | Dimensions |\n| -------------------------------- | -------- | ---------- |\n| `orama/gte-small`                | Orama    | 384        |\n| `orama/gte-medium`               | Orama    | 768        |\n| `orama/gte-large`                | Orama    | 1024       |\n| `openai/text-embedding-ada-002`  | Openai   | 1536       |\n| `openai/text-embedding-3-small`  | Openai   | 1536       |\n| `openai/text-embedding-3-large`  | Openai   | 3072       |\n\nAvailable **chat** models:\n\n| Model name                       | Provider |\n| -------------------------------- | -------- |\n| `openai/openai/gpt-4o`           | Openai   |\n| `openai/gpt-4o-mini`             | Openai   |\n| `openai/gpt-4-turbo`             | Openai   |\n| `openai/gpt-4`                   | Openai   |\n| `openai/gpt-3.5-turbo`           | Openai   |\n\nMode models coming soon!\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/plugin-vitepress/README.md":"# Vitepress Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Vitepress website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress).\n\n# TL;DR\n\n```js\n// .vitepress/config.js\n\nimport { defineConfig } from 'vitepress'\nimport { OramaPlugin } from '@orama/plugin-vitepress'\n\nexport default defineConfig({\n  // ...\n  extends: {\n    vite: {\n      plugins: [OramaPlugin()]\n    },\n  }\n})\n```\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","packages/stemmers/README.md":"# Orama Stemmers\n\nOrama can analyze the input and perform a `stemming` operation, which allows the engine to perform more optimized queries, as well as save indexing space.\n\n<!-- LANGUAGES:START -->\nRight now, Orama supports 31 languages and stemmers out of the box:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\nChinese (Mandarin) and Japanese are supported through dedicated tokenizers (`@orama/tokenizers`) and stop-word removal (`@orama/stopwords`), not through stemming.\n\n```js\nimport { create } from '@orama/orama'\nimport { stemmer, language } from '@orama/stemmers/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stemming: true,\n      stemmer,\n      language\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stemming](https://docs.orama.com/docs/orama-js/text-analysis/stemming).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n","packages/stemmers/lib/README.md":"# Snowball Stemmer\n\nThis directory contains **generated** stemmers using the\n[Snowball](http://snowballstem.org/) compiler.\n\nDo not edit these files directly.\n","packages/stopwords/README.md":"# Orama Stop-words\n\n<!-- LANGUAGES:START -->\nThis package provides support for stop-words removal in 33 languages:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Chinese (Mandarin)\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Japanese\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\n```js\nimport { create } from '@orama/orama'\nimport { stopwords as italianStopwords } from '@orama/stopwords/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stopwords: italianStopwords\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stop-words](https://docs.orama.com/docs/orama-js/text-analysis/stop-words).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n","packages/switch/README.md":"# Orama Switch\n\nOrama Switch allows you to run queries on Orama Cloud and OSS with a single interface.\n\n## Installation\n\n```sh\nnpm i @orama/switch\n```\n\n## Usage\n\nYou can use the same APIs to access either Orama Cloud or Orama OSS.\n\nFor instance, this is how you would interact with Orama Cloud:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { OramaClient } from '@oramacloud/client'\n\nconst client = new OramaClient({\n  endpoint: '<Your Orama Cloud Endpoint>',\n  api_key: '<Your Orama Cloud API Key>',\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\nAnd this is Orama OSS:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { create } from '@orama/orama'\n\nconst db = await create({\n  schema: {\n    productName: 'string',\n    price: 'number'\n  }\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\n## License\n\n[Apache 2.0](/LICENSE.md)","packages/tokenizers/README.md":"# Orama Tokenizers\n\nThis package provides support for additional tokenizers for the Orama Search Engine.\n\nAvailable tokenizers:\n\n- Chinese (Mandarin, experimental)\n- Japanese (experimental)\n- Korean (experimental)\n\nUsage:\n\n```js\nimport { create } from \"@orama/orama\";\nimport { createTokenizer } from \"@orama/tokenizers/mandarin\";\n\nconst db = await create({\n  schema: {\n    myProperty: \"string\",\n    anotherProperty: \"number\",\n  },\n  components: {\n    tokenizer: await createTokenizer(),\n  },\n});\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n"},"items":[{"name":"README.md","path":"packages/orama/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/orama/README.md","title":"orama Documentation","category":"plugin-manifest","format":"markdown","content":"<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/orama-readme-hero-light.png#gh-light-mode-only\" />\n</p>\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nIf you need more info, help, or want to provide general feedback on Orama, join the [Orama Slack channel](https://orama.to/slack)\n\n# Highlighted features\n\n- [Full-Text search](https://docs.orama.com/docs/orama-js/search)\n- [Vector Search](https://docs.orama.com/docs/orama-js/search/vector-search)\n- [Hybrid Search](https://docs.orama.com/docs/orama-js/search/hybrid-search)\n- [GenAI Chat Sessions](https://docs.orama.com/docs/orama-js/answer-engine)\n- [Search Filters](https://docs.orama.com/docs/orama-js/search/filters)\n- [Geosearch](https://docs.orama.com/docs/orama-js/search/geosearch)\n- [Pinning Rules (Merchandising)](https://docs.orama.com/docs/orama-js/results-pinning)\n- [Facets](https://docs.orama.com/docs/orama-js/search/facets)\n- [Fields Boosting](https://docs.orama.com/docs/orama-js/search/fields-boosting)\n- [Typo Tolerance](https://docs.orama.com/docs/orama-js/search#typo-tolerance)\n- [Exact Match](https://docs.orama.com/docs/orama-js/search#exact-match)\n- [BM25](https://docs.orama.com/docs/orama-js/search/bm25)\n- [Stemming and tokenization in 30 languages](https://docs.orama.com/docs/orama-js/text-analysis/stemming)\n- [Plugin System](https://docs.orama.com/docs/orama-js/plugins)\n\n# Installation\n\nYou can install Orama using `npm`, `yarn`, `pnpm`, `bun`:\n\n```sh\nnpm i @orama/orama\n```\n\nOr import it directly in a browser module:\n\n```html\n<html>\n  <body>\n    <script type=\"module\">\n      import { create, insert, search } from 'https://cdn.jsdelivr.net/npm/@orama/orama@latest/+esm'\n    </script>\n  </body>\n</html>\n```\n\nWith Deno, you can just use the same CDN URL or use npm specifiers:\n\n```js\nimport { create, search, insert } from 'npm:@orama/orama'\n```\n\nRead the complete documentation at [https://docs.orama.com](https://docs.orama.com).\n\n# Orama Features\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/features-light.png#gh-light-mode-only\" />\n</p>\n\n# Usage\n\nOrama is quite simple to use. The first thing to do is to create a new database\ninstance and set an indexing schema:\n\n```js\nimport { create, insert, remove, search, searchVector } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    name: 'string',\n    description: 'string',\n    price: 'number',\n    embedding: 'vector[1536]', // Vector size must be expressed during schema initialization\n    meta: {\n      rating: 'number',\n    },\n  },\n})\n\ninsert(db, {\n  name: 'Noise cancelling headphones',\n  description: 'Best noise cancelling headphones on the market',\n  price: 99.99,\n  embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n  meta: {\n    rating: 4.5\n  }\n})\n\nconst results = search(db, {\n  term: 'Best headphones'\n})\n\n// {\n//   elapsed: {\n//     raw: 21492,\n//     formatted: '21μs',\n//   },\n//   hits: [\n//     {\n//       id: '41013877-56',\n//       score: 0.925085832971998432,\n//       document: {\n//         name: 'Noise cancelling headphones',\n//         description: 'Best noise cancelling headphones on the market',\n//         price: 99.99,\n//         embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n//         meta: {\n//           rating: 4.5\n//         }\n//       }\n//     }\n//   ],\n//   count: 1\n// }\n```\n\nOrama currently supports 10 different data types:\n\n| Type             | Description                                                                 | Example                                                                     |\n| ---------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n| `string`         | A string of characters.                                                     | `'Hello world'`                                                             |\n| `number`         | A numeric value, either float or integer.                                   | `42`                                                                        |\n| `boolean`        | A boolean value.                                                            | `true`                                                                      |\n| `enum`           | An enum value.                                                              | `'drama'`                                                                   |\n| `geopoint`       | A geopoint value.                                                           | `{ lat: 40.7128, lon: 74.0060 }`                                            |\n| `string[]`       | An array of strings.                                                        | `['red', 'green', 'blue']`                                                  |\n| `number[]`       | An array of numbers.                                                        | `[42, 91, 28.5]`                                                            |\n| `boolean[]`      | An array of booleans.                                                       | `[true, false, false]`                                                      |\n| `enum[]`         | An array of enums.                                                          | `['comedy', 'action', 'romance']`                                           |\n| `vector[<size>]` | A vector of numbers to perform vector search on.                            | `[0.403, 0.192, 0.830]`                                                     |\n\n# Vector and Hybrid Search Support\n\nOrama supports both vector and hybrid search by just setting `mode: 'vector'` when performing search.\n\nTo perform this kind of search, you'll need to provide [text embeddings](https://en.wikipedia.org/wiki/Word_embedding) at search time:\n\n```js\nimport { create, insertMultiple, search } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    title: 'string',\n    embedding: 'vector[5]'', // we are using a 5-dimensional vector.\n  },\n});\n\ninsertMultiple(db, [\n  { title: 'The Prestige', embedding: [0.938293, 0.284951, 0.348264, 0.948276, 0.56472] },\n  { title: 'Barbie', embedding: [0.192839, 0.028471, 0.284738, 0.937463, 0.092827] },\n  { title: 'Oppenheimer', embedding: [0.827391, 0.927381, 0.001982, 0.983821, 0.294841] },\n])\n\nconst results = search(db, {\n  // Search mode. Can be 'vector', 'hybrid', or 'fulltext'\n  mode: 'vector',\n  vector: {\n    // The vector (text embedding) to use for search\n    value: [0.938292, 0.284961, 0.248264, 0.748276, 0.26472],\n    // The schema property where Orama should compare embeddings\n    property: 'embedding',\n  },\n  // Minimum similarity to determine a match. Defaults to `0.8`\n  similarity: 0.85,\n  // Defaults to `false`. Setting to 'true' will return the embeddings in the response (which can be very large).\n  includeVectors: true,\n})\n```\n\nHave trouble generating embeddings for vector and hybrid search? Try our `@orama/plugin-embeddings` plugin!\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend, like @tensorflow/tfjs-backend-webgl\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    // Schema property used to store generated embeddings\n    defaultProperty: 'embeddings',\n    onInsert: {\n      // Generate embeddings at insert-time\n      generate: true,\n      // properties to use for generating embeddings at insert time.\n      // Will be concatenated to generate a unique embedding.\n      properties: ['description'],\n      verbose: true,\n    }\n  }\n})\n\nconst db = create({\n  schema: {\n    description: 'string',\n    // Orama generates 512-dimensions vectors.\n    // When using @orama/plugin-embeddings, set the property where you want to store embeddings as `vector[512]`.\n    embeddings: 'vector[512]'\n  },\n  plugins: [plugin]\n})\n\n// Orama will generate and store embeddings at insert-time!\nawait insert(db, { description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties' })\nawait insert(db, { description: 'Kids Wired Headphones for School Students K-12' })\nawait insert(db, { description: 'Kids Headphones Bulk 5-Pack for K-12 School' })\nawait insert(db, { description: 'Bose QuietComfort Bluetooth Headphones' })\n\n// Orama will also generate and use embeddings at search time when search mode is set to \"vector\" or \"hybrid\"!\nconst searchResults = await search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nWant to use OpenAI embedding models? Use our [Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) plugin to call OpenAI from the client-side securely.\n\n# RAG and Chat Experiences with Orama\n\nSince `v3.0.0`, Orama allows you to create your own ChatGPT/Perplexity/SearchGPT-like experience. You will need to call the OpenAI APIs, so we strongly recommend using the [Secure Proxy Plugin](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) to do that securely from your client side. It's free!\n\n```js\nimport { create, insert } from '@orama/orama'\nimport { pluginSecureProxy } from '@orama/plugin-secure-proxy'\n\nconst secureProxy = await pluginSecureProxy({\n  apiKey: 'my-api-key',\n  defaultProperty: 'embeddings',\n  models: {\n    // The chat model to use to generate the chat answer\n    chat: 'openai/gpt-4o-mini'\n  }\n})\n\nconst db = create({\n  schema: {\n    name: 'string'\n  },\n  plugins: [secureProxy]\n})\n\ninsert(db, { name: 'John Doe' })\ninsert(db, { name: 'Jane Doe' })\n\nconst session = new AnswerSession(db, {\n  // Customize the prompt for the system\n  systemPrompt: 'You will get a name as context, please provide a greeting message',\n  events: {\n    // Log all state changes. Useful to reactively update a UI on a new message chunk, sources, etc.\n    onStateChange: console.log,\n  }\n})\n\nconst response = await session.ask({\n  term: 'john'\n})\n\nconsole.log(response) // Hello, John Doe! How are you doing?\n```\n\nRead the complete documentation [here](https://docs.orama.com/docs/orama-js/usage/answer-engine/introduction).\n\n# Official Docs\n\nRead the complete documentation at [https://docs.orama.com/open-source](https://docs.orama.com/open-source).\n\n# Official Orama Plugins\n\n- [Plugin Embeddings](https://docs.orama.com/docs/orama-js/plugins/plugin-embeddings)\n- [Plugin Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy)\n- [Plugin Analytics](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics)\n- [Plugin Data Persistence](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence)\n- [Plugin QPS](https://docs.orama.com/docs/orama-js/plugins/plugin-qps)\n- [Plugin PT15](https://docs.orama.com/docs/orama-js/plugins/plugin-pt15)\n- [Plugin Vitepress](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress)\n- [Plugin Docusaurus](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n- [Plugin Astro](https://docs.orama.com/docs/orama-js/plugins/plugin-astro)\n- [Plugin Nextra](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra)\n\nWrite your own plugin: [https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins](https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins)\n\n# License\n\nOrama is licensed under the [Apache 2.0](/LICENSE.md) license.\n\n<img referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=fb0c2057-e709-49a9-b634-cf90bdfb2dbd\" />","isInternal":false,"tokens":2899,"sizeBytes":11597},{"name":"README.md","path":"packages/plugin-analytics/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-analytics/README.md","title":"plugin-analytics Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Analytics Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide analytics data on your searches.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\nTo use the Orama Analytics Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginAnalytics} from '@orama/plugin-analytics'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string'\n  },\n  plugins: [\n    pluginAnalytics({\n      apiKey: '<API-KEY>',\n      endpoint: '<ENDPOINT>'\n    })\n  ]\n})\n```\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","isInternal":false,"tokens":263,"sizeBytes":1050},{"name":"README.md","path":"packages/plugin-astro/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-astro/README.md","title":"plugin-astro Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama's Astro Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis package is a (still experimental) [Orama](https://oramasearch.com) integration for\n[Astro](https://astro.build).\n\n## Usage\n\n### Configuring the Astro integration\n\n```typescript\n// In `astro.config.mjs`\nimport orama from '@orama/plugin-astro'\n\n// https://astro.build/config\nexport default defineConfig({\n  integrations: [\n    orama({\n      // We can generate more than one DB, with different configurations\n      mydb: {\n        // Required. Only pages matching this path regex will be indexed\n        pathMatcher: /blog\\/[0-9]{4}\\/[0-9]{2}\\/[0-9]{2}\\/.+$/,\n\n        // Optional. 'english' by default\n        language: 'spanish',\n\n        // Optional. ['body'] by default. Use it to constraint what is used to\n        // index a page.\n        contentSelectors: ['h1', 'main']\n      }\n    })\n  ]\n})\n```\n\nWhen running the `astro build` command, a new DB file will be persisted in the\n`dist/assets` directory. For the particular case of this example, it will be\nsaved in the file `dist/assets/oramaDB_mydb.json`.\n\n### Using generated DBs in your pages\n\nTo use the generated DBs in your pages, you can include a script in your\n`<head>` section, as the following one:\n\n```html\n<head>\n  <!-- Other stuff -->\n  <script>\n    // Astro will do the job of bundling everything for you\n    import { getOramaDB, search } from \"@orama/plugin-astro/client\"\n\n    // We load the DB that we generated at build time, this is an asynchronous\n    // operation, so we must either await, or rely on `.then` calls.\n    const db = await getOramaDB('mydb')\n\n    // Now we can search inside our DB. Of course, feel free to use it in more\n    // interesting ways.\n    console.log('Search Results')\n    console.log(search(db, { term: 'mySearchTerm' }))\n  </script>\n</head>\n```\n\n**NOTE:** For now, this plugin only supports readonly DBs. This might change in\nthe future if there's demand for it.\n","isInternal":false,"tokens":512,"sizeBytes":2047},{"name":"README.md","path":"packages/plugin-data-persistence/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-data-persistence/README.md","title":"plugin-data-persistence Documentation","category":"plugin-manifest","format":"markdown","content":"# Data Persistence Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to provide data persistence capabilities to Orama.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","isInternal":false,"tokens":113,"sizeBytes":450},{"name":"README.md","path":"packages/plugin-docusaurus-v3/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-docusaurus-v3/README.md","title":"plugin-docusaurus-v3 Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Plugin for Docusaurus v3\n\n[Plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n\n## Local Development\n\nTo test the plugin locally, follow these steps:\n\n### (Required only if using workspace dependencies):\nReplace all the `workspace:*` packages with the latest version of the package.\n\n#### Steps:\n1. Add a link to the plugin in your Docusaurus project:\n\n```bash\n\"dependencies\": {\n  \"@orama/plugin-docusaurus\": \"file:../path/to/plugin\"\n}\n```\n2. Install the plugin:\n\n```bash\npnpm install\n```\n\n3. Start your Plugin project (plugin folder):\n\n```bash\npnpm run watch\n```\n\n4. Copy the needed CSS files into dist folder:\n```bash\npnpm run postbuild\n```\n\n5. Start your Docusaurus project:\n\n```bash\npnpm start\n```\n\nThe Docusaurus project will watch automatically for changes in the plugin, so you can edit the plugin and see the changes in real-time.\n\n### Other information\n- The Answer Session will not work while working on Staging due to the answer session url being hard-corded to production. To test it please, use prod environment.\n\n\nFor Docusaurus v2, please refer to the [v2 branch.](https://www.npmjs.com/package/@orama/plugin-docusaurus)\n","isInternal":false,"tokens":295,"sizeBytes":1178},{"name":"README.md","path":"packages/plugin-docusaurus/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-docusaurus/README.md","title":"plugin-docusaurus Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama plugin for Docusaurus v2\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\n## Pre-requisites\nIn order guarantee a correct functionality of the plugin, you need to have the `@docusaurus/core` at least in the version `2.4.3`.\n\n| :warning: This plugin do not support Docusaurus v3. Use [`@orama/plugin-docusaurus-v3`](https://www.npmjs.com/package/@orama/plugin-docusaurus-v3) instead. |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n## Usage\n\nInstall the plugin:\n\n```bash\nnpm install --save @orama/plugin-docusaurus\n```\n\n```bash\nyarn add @orama/plugin-docusaurus\n```\n\nAdd the plugin to your `docusaurus.config.js`:\n\n```js\nplugins: ['@orama/plugin-docusaurus']\n```\n\n# License\n\nLicensed under the [Apache 2.0](/LICENSE.md) license.\n","isInternal":false,"tokens":239,"sizeBytes":956},{"name":"README.md","path":"packages/plugin-embeddings/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-embeddings/README.md","title":"plugin-embeddings Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Plugin Embeddings\n\n**Orama Plugin Embeddings** allows you to generate fast text embeddings at insert and search time offline, directly on your machine - no OpenAI needed!\n\n## Installation\n\nTo get started with **Orama Plugin Embeddings**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-embeddings\n```\n\n**Important note**: to use this plugin, you'll also need to install one of the following TensorflowJS backend:\n\n- `@tensorflow/tfjs`\n- `@tensorflow/tfjs-node`\n- `@tensorflow/tfjs-backend-webgl`\n- `@tensorflow/tfjs-backend-cpu`\n- `@tensorflow/tfjs-node-gpu`\n- `@tensorflow/tfjs-backend-wasm`\n\nFor example, if you're running Orama on the browser, we highly recommend using `@tensorflow/tfjs-backend-webgl`:\n\n```sh\nnpm i @tensorflow/tfjs-backend-webgl\n```\n\nIf you're using Orama in Node.js, we recommend using `@tensorflow/tfjs-node`:\n\n```sh\nnpm i @tensorflow/tfjs-node\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    defaultProperty: 'embeddings', // Property used to store generated embeddings\n    onInsert: {\n      generate: true, // Generate embeddings at insert-time\n      properties: ['description'], // properties to use for generating embeddings at insert time\n      verbose: true,\n    }\n  }\n})\n\nconst db = await create({\n  schema: {\n    description: 'string',\n    embeddings: 'vector[512]' // Orama generates 512-dimensions vectors\n  },\n  plugins: [plugin]\n})\n```\n\nExample usage at insert time:\n\n```js\nawait insert(db, {\n  description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties'\n})\n\nawait insert(db, {\n  description: 'Kids Wired Headphones for School Students K-12'\n})\n\nawait insert(db, {\n  description: 'Kids Headphones Bulk 5-Pack for K-12 School'\n})\n\nawait insert(db, {\n  description: 'Bose QuietComfort Bluetooth Headphones'\n})\n```\n\nOrama will automatically generate text embeddings and store them into the `embeddings` property.\n\nThen, you can use the `vector` or `hybrid` setting to perform hybrid or vector search at runtime:\n\n```js\nawait search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nOrama will generate embeddings at search time and perform vector or hybrid search for you.\n\n# License\n\n[Apache 2.0](/LICENSE.md)","isInternal":false,"tokens":604,"sizeBytes":2415},{"name":"README.md","path":"packages/plugin-match-highlight/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-match-highlight/README.md","title":"plugin-match-highlight Documentation","category":"plugin-manifest","format":"markdown","content":"# Match Highlight Plugin - DEPRECATED\n\nThis plugin is deprecated in favor of [Orama Highlight](https://www.npmjs.com/package/@orama/highlight). It's faster, easier to use, and with a minimal memory footprint. Give it a try! \n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","isInternal":false,"tokens":66,"sizeBytes":263},{"name":"README.md","path":"packages/plugin-nextra/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-nextra/README.md","title":"plugin-nextra Documentation","category":"plugin-manifest","format":"markdown","content":"# Nextra Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Nextra website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","isInternal":false,"tokens":112,"sizeBytes":446},{"name":"README.md","path":"packages/plugin-parsedoc/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-parsedoc/README.md","title":"plugin-parsedoc Documentation","category":"plugin-manifest","format":"markdown","content":"# Parsedoc Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to generate an index for Orama from HTML files\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-parsedoc).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","isInternal":false,"tokens":108,"sizeBytes":430},{"name":"README.md","path":"packages/plugin-pt15/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-pt15/README.md","title":"plugin-pt15 Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Plugin PT15\n\nFast ranking algorithm based on token position.\n\n## Installation\n\nTo get started with **Orama Plugin PT15**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-pt15\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginPT15 } from '@orama/plugin-pt15'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginPT15() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)","isInternal":false,"tokens":110,"sizeBytes":439},{"name":"README.md","path":"packages/plugin-qps/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-qps/README.md","title":"plugin-qps Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Plugin Quantum Proximity Scoring\n\n**Orama Plugin Quantum Proximity Scoring** ranks search results based on the proximity of query tokens in the document.\n\n## Installation\n\nTo get started with **Orama Plugin QPS**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-qps\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginQPS } from '@orama/plugin-qps'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginQPS() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)","isInternal":false,"tokens":132,"sizeBytes":527},{"name":"README.md","path":"packages/plugin-secure-proxy/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-secure-proxy/README.md","title":"plugin-secure-proxy Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Secure Proxy Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOrama plugin for generating embeddings and performing vector/hybrid search securely on the front-end.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\nTo use the Orama Secure Proxy Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginSecureProxy} from '@orama/plugin-secure-proxy'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string',\n    embeddings: 'vector[384]'\n  },\n  plugins: [\n    pluginSecureProxy({\n      apiKey: 'xyz',\n      embeddings: {\n        defaultProperty: 'embeddings',\n        model: 'orama/gte-small',\n        onInsert: {\n          generate: true, // Generate the embeddings at insert-time\n          properties: ['title', 'description'], // Properties to generate embeddings from\n          verbose: false\n        },\n      },\n      chat: {\n        model: 'openai/gpt-4o'\n      }\n    })\n  ]\n})\n```\n\nAvailable **embeddings** models:\n\n| Model name                       | Provider | Dimensions |\n| -------------------------------- | -------- | ---------- |\n| `orama/gte-small`                | Orama    | 384        |\n| `orama/gte-medium`               | Orama    | 768        |\n| `orama/gte-large`                | Orama    | 1024       |\n| `openai/text-embedding-ada-002`  | Openai   | 1536       |\n| `openai/text-embedding-3-small`  | Openai   | 1536       |\n| `openai/text-embedding-3-large`  | Openai   | 3072       |\n\nAvailable **chat** models:\n\n| Model name                       | Provider |\n| -------------------------------- | -------- |\n| `openai/openai/gpt-4o`           | Openai   |\n| `openai/gpt-4o-mini`             | Openai   |\n| `openai/gpt-4-turbo`             | Openai   |\n| `openai/gpt-4`                   | Openai   |\n| `openai/gpt-3.5-turbo`           | Openai   |\n\nMode models coming soon!\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","isInternal":false,"tokens":598,"sizeBytes":2390},{"name":"README.md","path":"packages/plugin-vitepress/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/plugin-vitepress/README.md","title":"plugin-vitepress Documentation","category":"plugin-manifest","format":"markdown","content":"# Vitepress Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Vitepress website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress).\n\n# TL;DR\n\n```js\n// .vitepress/config.js\n\nimport { defineConfig } from 'vitepress'\nimport { OramaPlugin } from '@orama/plugin-vitepress'\n\nexport default defineConfig({\n  // ...\n  extends: {\n    vite: {\n      plugins: [OramaPlugin()]\n    },\n  }\n})\n```\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n","isInternal":false,"tokens":177,"sizeBytes":705},{"name":"README.md","path":"packages/stemmers/lib/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/stemmers/lib/README.md","title":"lib Documentation","category":"plugin-manifest","format":"markdown","content":"# Snowball Stemmer\n\nThis directory contains **generated** stemmers using the\n[Snowball](http://snowballstem.org/) compiler.\n\nDo not edit these files directly.\n","isInternal":false,"tokens":40,"sizeBytes":159},{"name":"README.md","path":"packages/stemmers/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/stemmers/README.md","title":"stemmers Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Stemmers\n\nOrama can analyze the input and perform a `stemming` operation, which allows the engine to perform more optimized queries, as well as save indexing space.\n\n<!-- LANGUAGES:START -->\nRight now, Orama supports 31 languages and stemmers out of the box:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\nChinese (Mandarin) and Japanese are supported through dedicated tokenizers (`@orama/tokenizers`) and stop-word removal (`@orama/stopwords`), not through stemming.\n\n```js\nimport { create } from '@orama/orama'\nimport { stemmer, language } from '@orama/stemmers/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stemming: true,\n      stemmer,\n      language\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stemming](https://docs.orama.com/docs/orama-js/text-analysis/stemming).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n","isInternal":false,"tokens":302,"sizeBytes":1208},{"name":"README.md","path":"packages/stopwords/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/stopwords/README.md","title":"stopwords Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Stop-words\n\n<!-- LANGUAGES:START -->\nThis package provides support for stop-words removal in 33 languages:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Chinese (Mandarin)\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Japanese\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\n```js\nimport { create } from '@orama/orama'\nimport { stopwords as italianStopwords } from '@orama/stopwords/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stopwords: italianStopwords\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stop-words](https://docs.orama.com/docs/orama-js/text-analysis/stop-words).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n","isInternal":false,"tokens":231,"sizeBytes":923},{"name":"README.md","path":"packages/switch/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/switch/README.md","title":"switch Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Switch\n\nOrama Switch allows you to run queries on Orama Cloud and OSS with a single interface.\n\n## Installation\n\n```sh\nnpm i @orama/switch\n```\n\n## Usage\n\nYou can use the same APIs to access either Orama Cloud or Orama OSS.\n\nFor instance, this is how you would interact with Orama Cloud:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { OramaClient } from '@oramacloud/client'\n\nconst client = new OramaClient({\n  endpoint: '<Your Orama Cloud Endpoint>',\n  api_key: '<Your Orama Cloud API Key>',\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\nAnd this is Orama OSS:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { create } from '@orama/orama'\n\nconst db = await create({\n  schema: {\n    productName: 'string',\n    price: 'number'\n  }\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\n## License\n\n[Apache 2.0](/LICENSE.md)","isInternal":false,"tokens":272,"sizeBytes":1088},{"name":"README.md","path":"packages/tokenizers/README.md","rawUrl":"https://raw.githubusercontent.com/oramasearch/orama/HEAD/packages/tokenizers/README.md","title":"tokenizers Documentation","category":"plugin-manifest","format":"markdown","content":"# Orama Tokenizers\n\nThis package provides support for additional tokenizers for the Orama Search Engine.\n\nAvailable tokenizers:\n\n- Chinese (Mandarin, experimental)\n- Japanese (experimental)\n- Korean (experimental)\n\nUsage:\n\n```js\nimport { create } from \"@orama/orama\";\nimport { createTokenizer } from \"@orama/tokenizers/mandarin\";\n\nconst db = await create({\n  schema: {\n    myProperty: \"string\",\n    anotherProperty: \"number\",\n  },\n  components: {\n    tokenizer: await createTokenizer(),\n  },\n});\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n","isInternal":false,"tokens":135,"sizeBytes":538}],"systemPromptSnippet":"<agent_rules repository=\"oramasearch/orama\">\n\n<!-- Skill/Rule: orama Documentation (packages/orama/README.md) -->\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/orama-readme-hero-light.png#gh-light-mode-only\" />\n</p>\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nIf you need more info, help, or want to provide general feedback on Orama, join the [Orama Slack channel](https://orama.to/slack)\n\n# Highlighted features\n\n- [Full-Text search](https://docs.orama.com/docs/orama-js/search)\n- [Vector Search](https://docs.orama.com/docs/orama-js/search/vector-search)\n- [Hybrid Search](https://docs.orama.com/docs/orama-js/search/hybrid-search)\n- [GenAI Chat Sessions](https://docs.orama.com/docs/orama-js/answer-engine)\n- [Search Filters](https://docs.orama.com/docs/orama-js/search/filters)\n- [Geosearch](https://docs.orama.com/docs/orama-js/search/geosearch)\n- [Pinning Rules (Merchandising)](https://docs.orama.com/docs/orama-js/results-pinning)\n- [Facets](https://docs.orama.com/docs/orama-js/search/facets)\n- [Fields Boosting](https://docs.orama.com/docs/orama-js/search/fields-boosting)\n- [Typo Tolerance](https://docs.orama.com/docs/orama-js/search#typo-tolerance)\n- [Exact Match](https://docs.orama.com/docs/orama-js/search#exact-match)\n- [BM25](https://docs.orama.com/docs/orama-js/search/bm25)\n- [Stemming and tokenization in 30 languages](https://docs.orama.com/docs/orama-js/text-analysis/stemming)\n- [Plugin System](https://docs.orama.com/docs/orama-js/plugins)\n\n# Installation\n\nYou can install Orama using `npm`, `yarn`, `pnpm`, `bun`:\n\n```sh\nnpm i @orama/orama\n```\n\nOr import it directly in a browser module:\n\n```html\n<html>\n  <body>\n    <script type=\"module\">\n      import { create, insert, search } from 'https://cdn.jsdelivr.net/npm/@orama/orama@latest/+esm'\n    </script>\n  </body>\n</html>\n```\n\nWith Deno, you can just use the same CDN URL or use npm specifiers:\n\n```js\nimport { create, search, insert } from 'npm:@orama/orama'\n```\n\nRead the complete documentation at [https://docs.orama.com](https://docs.orama.com).\n\n# Orama Features\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/oramasearch/orama/refs/heads/main/misc/readme/features-light.png#gh-light-mode-only\" />\n</p>\n\n# Usage\n\nOrama is quite simple to use. The first thing to do is to create a new database\ninstance and set an indexing schema:\n\n```js\nimport { create, insert, remove, search, searchVector } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    name: 'string',\n    description: 'string',\n    price: 'number',\n    embedding: 'vector[1536]', // Vector size must be expressed during schema initialization\n    meta: {\n      rating: 'number',\n    },\n  },\n})\n\ninsert(db, {\n  name: 'Noise cancelling headphones',\n  description: 'Best noise cancelling headphones on the market',\n  price: 99.99,\n  embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n  meta: {\n    rating: 4.5\n  }\n})\n\nconst results = search(db, {\n  term: 'Best headphones'\n})\n\n// {\n//   elapsed: {\n//     raw: 21492,\n//     formatted: '21μs',\n//   },\n//   hits: [\n//     {\n//       id: '41013877-56',\n//       score: 0.925085832971998432,\n//       document: {\n//         name: 'Noise cancelling headphones',\n//         description: 'Best noise cancelling headphones on the market',\n//         price: 99.99,\n//         embedding: [0.2432, 0.9431, 0.5322, 0.4234, ...],\n//         meta: {\n//           rating: 4.5\n//         }\n//       }\n//     }\n//   ],\n//   count: 1\n// }\n```\n\nOrama currently supports 10 different data types:\n\n| Type             | Description                                                                 | Example                                                                     |\n| ---------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n| `string`         | A string of characters.                                                     | `'Hello world'`                                                             |\n| `number`         | A numeric value, either float or integer.                                   | `42`                                                                        |\n| `boolean`        | A boolean value.                                                            | `true`                                                                      |\n| `enum`           | An enum value.                                                              | `'drama'`                                                                   |\n| `geopoint`       | A geopoint value.                                                           | `{ lat: 40.7128, lon: 74.0060 }`                                            |\n| `string[]`       | An array of strings.                                                        | `['red', 'green', 'blue']`                                                  |\n| `number[]`       | An array of numbers.                                                        | `[42, 91, 28.5]`                                                            |\n| `boolean[]`      | An array of booleans.                                                       | `[true, false, false]`                                                      |\n| `enum[]`         | An array of enums.                                                          | `['comedy', 'action', 'romance']`                                           |\n| `vector[<size>]` | A vector of numbers to perform vector search on.                            | `[0.403, 0.192, 0.830]`                                                     |\n\n# Vector and Hybrid Search Support\n\nOrama supports both vector and hybrid search by just setting `mode: 'vector'` when performing search.\n\nTo perform this kind of search, you'll need to provide [text embeddings](https://en.wikipedia.org/wiki/Word_embedding) at search time:\n\n```js\nimport { create, insertMultiple, search } from '@orama/orama'\n\nconst db = create({\n  schema: {\n    title: 'string',\n    embedding: 'vector[5]'', // we are using a 5-dimensional vector.\n  },\n});\n\ninsertMultiple(db, [\n  { title: 'The Prestige', embedding: [0.938293, 0.284951, 0.348264, 0.948276, 0.56472] },\n  { title: 'Barbie', embedding: [0.192839, 0.028471, 0.284738, 0.937463, 0.092827] },\n  { title: 'Oppenheimer', embedding: [0.827391, 0.927381, 0.001982, 0.983821, 0.294841] },\n])\n\nconst results = search(db, {\n  // Search mode. Can be 'vector', 'hybrid', or 'fulltext'\n  mode: 'vector',\n  vector: {\n    // The vector (text embedding) to use for search\n    value: [0.938292, 0.284961, 0.248264, 0.748276, 0.26472],\n    // The schema property where Orama should compare embeddings\n    property: 'embedding',\n  },\n  // Minimum similarity to determine a match. Defaults to `0.8`\n  similarity: 0.85,\n  // Defaults to `false`. Setting to 'true' will return the embeddings in the response (which can be very large).\n  includeVectors: true,\n})\n```\n\nHave trouble generating embeddings for vector and hybrid search? Try our `@orama/plugin-embeddings` plugin!\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend, like @tensorflow/tfjs-backend-webgl\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    // Schema property used to store generated embeddings\n    defaultProperty: 'embeddings',\n    onInsert: {\n      // Generate embeddings at insert-time\n      generate: true,\n      // properties to use for generating embeddings at insert time.\n      // Will be concatenated to generate a unique embedding.\n      properties: ['description'],\n      verbose: true,\n    }\n  }\n})\n\nconst db = create({\n  schema: {\n    description: 'string',\n    // Orama generates 512-dimensions vectors.\n    // When using @orama/plugin-embeddings, set the property where you want to store embeddings as `vector[512]`.\n    embeddings: 'vector[512]'\n  },\n  plugins: [plugin]\n})\n\n// Orama will generate and store embeddings at insert-time!\nawait insert(db, { description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties' })\nawait insert(db, { description: 'Kids Wired Headphones for School Students K-12' })\nawait insert(db, { description: 'Kids Headphones Bulk 5-Pack for K-12 School' })\nawait insert(db, { description: 'Bose QuietComfort Bluetooth Headphones' })\n\n// Orama will also generate and use embeddings at search time when search mode is set to \"vector\" or \"hybrid\"!\nconst searchResults = await search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nWant to use OpenAI embedding models? Use our [Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) plugin to call OpenAI from the client-side securely.\n\n# RAG and Chat Experiences with Orama\n\nSince `v3.0.0`, Orama allows you to create your own ChatGPT/Perplexity/SearchGPT-like experience. You will need to call the OpenAI APIs, so we strongly recommend using the [Secure Proxy Plugin](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy) to do that securely from your client side. It's free!\n\n```js\nimport { create, insert } from '@orama/orama'\nimport { pluginSecureProxy } from '@orama/plugin-secure-proxy'\n\nconst secureProxy = await pluginSecureProxy({\n  apiKey: 'my-api-key',\n  defaultProperty: 'embeddings',\n  models: {\n    // The chat model to use to generate the chat answer\n    chat: 'openai/gpt-4o-mini'\n  }\n})\n\nconst db = create({\n  schema: {\n    name: 'string'\n  },\n  plugins: [secureProxy]\n})\n\ninsert(db, { name: 'John Doe' })\ninsert(db, { name: 'Jane Doe' })\n\nconst session = new AnswerSession(db, {\n  // Customize the prompt for the system\n  systemPrompt: 'You will get a name as context, please provide a greeting message',\n  events: {\n    // Log all state changes. Useful to reactively update a UI on a new message chunk, sources, etc.\n    onStateChange: console.log,\n  }\n})\n\nconst response = await session.ask({\n  term: 'john'\n})\n\nconsole.log(response) // Hello, John Doe! How are you doing?\n```\n\nRead the complete documentation [here](https://docs.orama.com/docs/orama-js/usage/answer-engine/introduction).\n\n# Official Docs\n\nRead the complete documentation at [https://docs.orama.com/open-source](https://docs.orama.com/open-source).\n\n# Official Orama Plugins\n\n- [Plugin Embeddings](https://docs.orama.com/docs/orama-js/plugins/plugin-embeddings)\n- [Plugin Secure Proxy](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy)\n- [Plugin Analytics](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics)\n- [Plugin Data Persistence](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence)\n- [Plugin QPS](https://docs.orama.com/docs/orama-js/plugins/plugin-qps)\n- [Plugin PT15](https://docs.orama.com/docs/orama-js/plugins/plugin-pt15)\n- [Plugin Vitepress](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress)\n- [Plugin Docusaurus](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n- [Plugin Astro](https://docs.orama.com/docs/orama-js/plugins/plugin-astro)\n- [Plugin Nextra](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra)\n\nWrite your own plugin: [https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins](https://docs.orama.com/docs/orama-js/plugins/writing-your-own-plugins)\n\n# License\n\nOrama is licensed under the [Apache 2.0](/LICENSE.md) license.\n\n<img referrerpolicy=\"no-referrer-when-downgrade\" src=\"https://static.scarf.sh/a.png?x-pxid=fb0c2057-e709-49a9-b634-cf90bdfb2dbd\" />\n\n<!-- Skill/Rule: plugin-analytics Documentation (packages/plugin-analytics/README.md) -->\n# Orama Analytics Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide analytics data on your searches.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\nTo use the Orama Analytics Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginAnalytics} from '@orama/plugin-analytics'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string'\n  },\n  plugins: [\n    pluginAnalytics({\n      apiKey: '<API-KEY>',\n      endpoint: '<ENDPOINT>'\n    })\n  ]\n})\n```\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-analytics).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: plugin-astro Documentation (packages/plugin-astro/README.md) -->\n# Orama's Astro Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis package is a (still experimental) [Orama](https://oramasearch.com) integration for\n[Astro](https://astro.build).\n\n## Usage\n\n### Configuring the Astro integration\n\n```typescript\n// In `astro.config.mjs`\nimport orama from '@orama/plugin-astro'\n\n// https://astro.build/config\nexport default defineConfig({\n  integrations: [\n    orama({\n      // We can generate more than one DB, with different configurations\n      mydb: {\n        // Required. Only pages matching this path regex will be indexed\n        pathMatcher: /blog\\/[0-9]{4}\\/[0-9]{2}\\/[0-9]{2}\\/.+$/,\n\n        // Optional. 'english' by default\n        language: 'spanish',\n\n        // Optional. ['body'] by default. Use it to constraint what is used to\n        // index a page.\n        contentSelectors: ['h1', 'main']\n      }\n    })\n  ]\n})\n```\n\nWhen running the `astro build` command, a new DB file will be persisted in the\n`dist/assets` directory. For the particular case of this example, it will be\nsaved in the file `dist/assets/oramaDB_mydb.json`.\n\n### Using generated DBs in your pages\n\nTo use the generated DBs in your pages, you can include a script in your\n`<head>` section, as the following one:\n\n```html\n<head>\n  <!-- Other stuff -->\n  <script>\n    // Astro will do the job of bundling everything for you\n    import { getOramaDB, search } from \"@orama/plugin-astro/client\"\n\n    // We load the DB that we generated at build time, this is an asynchronous\n    // operation, so we must either await, or rely on `.then` calls.\n    const db = await getOramaDB('mydb')\n\n    // Now we can search inside our DB. Of course, feel free to use it in more\n    // interesting ways.\n    console.log('Search Results')\n    console.log(search(db, { term: 'mySearchTerm' }))\n  </script>\n</head>\n```\n\n**NOTE:** For now, this plugin only supports readonly DBs. This might change in\nthe future if there's demand for it.\n\n\n<!-- Skill/Rule: plugin-data-persistence Documentation (packages/plugin-data-persistence/README.md) -->\n# Data Persistence Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to provide data persistence capabilities to Orama.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-data-persistence).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: plugin-docusaurus-v3 Documentation (packages/plugin-docusaurus-v3/README.md) -->\n# Orama Plugin for Docusaurus v3\n\n[Plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-docusaurus)\n\n## Local Development\n\nTo test the plugin locally, follow these steps:\n\n### (Required only if using workspace dependencies):\nReplace all the `workspace:*` packages with the latest version of the package.\n\n#### Steps:\n1. Add a link to the plugin in your Docusaurus project:\n\n```bash\n\"dependencies\": {\n  \"@orama/plugin-docusaurus\": \"file:../path/to/plugin\"\n}\n```\n2. Install the plugin:\n\n```bash\npnpm install\n```\n\n3. Start your Plugin project (plugin folder):\n\n```bash\npnpm run watch\n```\n\n4. Copy the needed CSS files into dist folder:\n```bash\npnpm run postbuild\n```\n\n5. Start your Docusaurus project:\n\n```bash\npnpm start\n```\n\nThe Docusaurus project will watch automatically for changes in the plugin, so you can edit the plugin and see the changes in real-time.\n\n### Other information\n- The Answer Session will not work while working on Staging due to the answer session url being hard-corded to production. To test it please, use prod environment.\n\n\nFor Docusaurus v2, please refer to the [v2 branch.](https://www.npmjs.com/package/@orama/plugin-docusaurus)\n\n\n<!-- Skill/Rule: plugin-docusaurus Documentation (packages/plugin-docusaurus/README.md) -->\n# Orama plugin for Docusaurus v2\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\n## Pre-requisites\nIn order guarantee a correct functionality of the plugin, you need to have the `@docusaurus/core` at least in the version `2.4.3`.\n\n| :warning: This plugin do not support Docusaurus v3. Use [`@orama/plugin-docusaurus-v3`](https://www.npmjs.com/package/@orama/plugin-docusaurus-v3) instead. |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n## Usage\n\nInstall the plugin:\n\n```bash\nnpm install --save @orama/plugin-docusaurus\n```\n\n```bash\nyarn add @orama/plugin-docusaurus\n```\n\nAdd the plugin to your `docusaurus.config.js`:\n\n```js\nplugins: ['@orama/plugin-docusaurus']\n```\n\n# License\n\nLicensed under the [Apache 2.0](/LICENSE.md) license.\n\n\n<!-- Skill/Rule: plugin-embeddings Documentation (packages/plugin-embeddings/README.md) -->\n# Orama Plugin Embeddings\n\n**Orama Plugin Embeddings** allows you to generate fast text embeddings at insert and search time offline, directly on your machine - no OpenAI needed!\n\n## Installation\n\nTo get started with **Orama Plugin Embeddings**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-embeddings\n```\n\n**Important note**: to use this plugin, you'll also need to install one of the following TensorflowJS backend:\n\n- `@tensorflow/tfjs`\n- `@tensorflow/tfjs-node`\n- `@tensorflow/tfjs-backend-webgl`\n- `@tensorflow/tfjs-backend-cpu`\n- `@tensorflow/tfjs-node-gpu`\n- `@tensorflow/tfjs-backend-wasm`\n\nFor example, if you're running Orama on the browser, we highly recommend using `@tensorflow/tfjs-backend-webgl`:\n\n```sh\nnpm i @tensorflow/tfjs-backend-webgl\n```\n\nIf you're using Orama in Node.js, we recommend using `@tensorflow/tfjs-node`:\n\n```sh\nnpm i @tensorflow/tfjs-node\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginEmbeddings } from '@orama/plugin-embeddings'\nimport '@tensorflow/tfjs-node' // Or any other appropriate TensorflowJS backend\n\nconst plugin = await pluginEmbeddings({\n  embeddings: {\n    defaultProperty: 'embeddings', // Property used to store generated embeddings\n    onInsert: {\n      generate: true, // Generate embeddings at insert-time\n      properties: ['description'], // properties to use for generating embeddings at insert time\n      verbose: true,\n    }\n  }\n})\n\nconst db = await create({\n  schema: {\n    description: 'string',\n    embeddings: 'vector[512]' // Orama generates 512-dimensions vectors\n  },\n  plugins: [plugin]\n})\n```\n\nExample usage at insert time:\n\n```js\nawait insert(db, {\n  description: 'Classroom Headphones Bulk 5 Pack, Student On Ear Color Varieties'\n})\n\nawait insert(db, {\n  description: 'Kids Wired Headphones for School Students K-12'\n})\n\nawait insert(db, {\n  description: 'Kids Headphones Bulk 5-Pack for K-12 School'\n})\n\nawait insert(db, {\n  description: 'Bose QuietComfort Bluetooth Headphones'\n})\n```\n\nOrama will automatically generate text embeddings and store them into the `embeddings` property.\n\nThen, you can use the `vector` or `hybrid` setting to perform hybrid or vector search at runtime:\n\n```js\nawait search(db, {\n  term: 'Headphones for 12th grade students',\n  mode: 'vector'\n})\n```\n\nOrama will generate embeddings at search time and perform vector or hybrid search for you.\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n\n<!-- Skill/Rule: plugin-match-highlight Documentation (packages/plugin-match-highlight/README.md) -->\n# Match Highlight Plugin - DEPRECATED\n\nThis plugin is deprecated in favor of [Orama Highlight](https://www.npmjs.com/package/@orama/highlight). It's faster, easier to use, and with a minimal memory footprint. Give it a try! \n\n# License\n\n[Apache-2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: plugin-nextra Documentation (packages/plugin-nextra/README.md) -->\n# Nextra Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Nextra website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-nextra).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: plugin-parsedoc Documentation (packages/plugin-parsedoc/README.md) -->\n# Parsedoc Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nThis plugin aims to generate an index for Orama from HTML files\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-parsedoc).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: plugin-pt15 Documentation (packages/plugin-pt15/README.md) -->\n# Orama Plugin PT15\n\nFast ranking algorithm based on token position.\n\n## Installation\n\nTo get started with **Orama Plugin PT15**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-pt15\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginPT15 } from '@orama/plugin-pt15'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginPT15() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n\n<!-- Skill/Rule: plugin-qps Documentation (packages/plugin-qps/README.md) -->\n# Orama Plugin Quantum Proximity Scoring\n\n**Orama Plugin Quantum Proximity Scoring** ranks search results based on the proximity of query tokens in the document.\n\n## Installation\n\nTo get started with **Orama Plugin QPS**, just install it with npm:\n\n```sh\nnpm i @orama/plugin-qps\n```\n\n## Usage\n\n```js\nimport { create } from '@orama/orama'\nimport { pluginQPS } from '@orama/plugin-qps'\n\nconst db = await create({\n  schema: {\n    description: 'string',\n  },\n  plugins: [ pluginQPS() ],\n})\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n\n<!-- Skill/Rule: plugin-secure-proxy Documentation (packages/plugin-secure-proxy/README.md) -->\n# Orama Secure Proxy Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOrama plugin for generating embeddings and performing vector/hybrid search securely on the front-end.\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\nTo use the Orama Secure Proxy Plugin, you will need to sign up for a free account at [https://cloud.orama.com](https://cloud.orama.com)\n\n```js\nimport { create, insert, search } from '@orama/orama'\nimport { pluginSecureProxy} from '@orama/plugin-secure-proxy'\n\nconst db = await create({\n  schema: {\n    title: 'string',\n    description: 'string',\n    embeddings: 'vector[384]'\n  },\n  plugins: [\n    pluginSecureProxy({\n      apiKey: 'xyz',\n      embeddings: {\n        defaultProperty: 'embeddings',\n        model: 'orama/gte-small',\n        onInsert: {\n          generate: true, // Generate the embeddings at insert-time\n          properties: ['title', 'description'], // Properties to generate embeddings from\n          verbose: false\n        },\n      },\n      chat: {\n        model: 'openai/gpt-4o'\n      }\n    })\n  ]\n})\n```\n\nAvailable **embeddings** models:\n\n| Model name                       | Provider | Dimensions |\n| -------------------------------- | -------- | ---------- |\n| `orama/gte-small`                | Orama    | 384        |\n| `orama/gte-medium`               | Orama    | 768        |\n| `orama/gte-large`                | Orama    | 1024       |\n| `openai/text-embedding-ada-002`  | Openai   | 1536       |\n| `openai/text-embedding-3-small`  | Openai   | 1536       |\n| `openai/text-embedding-3-large`  | Openai   | 3072       |\n\nAvailable **chat** models:\n\n| Model name                       | Provider |\n| -------------------------------- | -------- |\n| `openai/openai/gpt-4o`           | Openai   |\n| `openai/gpt-4o-mini`             | Openai   |\n| `openai/gpt-4-turbo`             | Openai   |\n| `openai/gpt-4`                   | Openai   |\n| `openai/gpt-3.5-turbo`           | Openai   |\n\nMode models coming soon!\n\nFor the full configuration guide of this plugin, please follow the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy).\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: plugin-vitepress Documentation (packages/plugin-vitepress/README.md) -->\n# Vitepress Plugin\n\n[![Tests](https://github.com/oramasearch/orama/actions/workflows/turbo.yml/badge.svg)](https://github.com/oramasearch/orama/actions/workflows/turbo.yml)\n\nOfficial plugin to provide search capabilities through Orama on any Vitepress website!\n\n# Usage\n\nFor the complete usage guide, please refer to the [official plugin documentation](https://docs.orama.com/docs/orama-js/plugins/plugin-vitepress).\n\n# TL;DR\n\n```js\n// .vitepress/config.js\n\nimport { defineConfig } from 'vitepress'\nimport { OramaPlugin } from '@orama/plugin-vitepress'\n\nexport default defineConfig({\n  // ...\n  extends: {\n    vite: {\n      plugins: [OramaPlugin()]\n    },\n  }\n})\n```\n\n# License\n\n[Apache-2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: lib Documentation (packages/stemmers/lib/README.md) -->\n# Snowball Stemmer\n\nThis directory contains **generated** stemmers using the\n[Snowball](http://snowballstem.org/) compiler.\n\nDo not edit these files directly.\n\n\n<!-- Skill/Rule: stemmers Documentation (packages/stemmers/README.md) -->\n# Orama Stemmers\n\nOrama can analyze the input and perform a `stemming` operation, which allows the engine to perform more optimized queries, as well as save indexing space.\n\n<!-- LANGUAGES:START -->\nRight now, Orama supports 31 languages and stemmers out of the box:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\nChinese (Mandarin) and Japanese are supported through dedicated tokenizers (`@orama/tokenizers`) and stop-word removal (`@orama/stopwords`), not through stemming.\n\n```js\nimport { create } from '@orama/orama'\nimport { stemmer, language } from '@orama/stemmers/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stemming: true,\n      stemmer,\n      language\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stemming](https://docs.orama.com/docs/orama-js/text-analysis/stemming).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: stopwords Documentation (packages/stopwords/README.md) -->\n# Orama Stop-words\n\n<!-- LANGUAGES:START -->\nThis package provides support for stop-words removal in 33 languages:\n\n- Arabic\n- Armenian\n- Bulgarian\n- Chinese (Mandarin)\n- Czech\n- Danish\n- Dutch\n- English\n- Finnish\n- French\n- German\n- Greek\n- Hindi\n- Hungarian\n- Indonesian\n- Irish\n- Italian\n- Japanese\n- Lithuanian\n- Nepali\n- Norwegian\n- Portuguese\n- Romanian\n- Russian\n- Sanskrit\n- Serbian\n- Slovenian\n- Spanish\n- Swedish\n- Tamil\n- Turkish\n- Ukrainian\n- Vietnamese\n<!-- LANGUAGES:END -->\n\n```js\nimport { create } from '@orama/orama'\nimport { stopwords as italianStopwords } from '@orama/stopwords/italian'\n\nconst db = create({\n  schema: {\n  components: {\n    tokenizer: {\n      stopwords: italianStopwords\n    }\n  }\n})\n```\n\nRead more in the official docs: [https://docs.orama.com/docs/orama-js/text-analysis/stop-words](https://docs.orama.com/docs/orama-js/text-analysis/stop-words).\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n\n\n<!-- Skill/Rule: switch Documentation (packages/switch/README.md) -->\n# Orama Switch\n\nOrama Switch allows you to run queries on Orama Cloud and OSS with a single interface.\n\n## Installation\n\n```sh\nnpm i @orama/switch\n```\n\n## Usage\n\nYou can use the same APIs to access either Orama Cloud or Orama OSS.\n\nFor instance, this is how you would interact with Orama Cloud:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { OramaClient } from '@oramacloud/client'\n\nconst client = new OramaClient({\n  endpoint: '<Your Orama Cloud Endpoint>',\n  api_key: '<Your Orama Cloud API Key>',\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\nAnd this is Orama OSS:\n\n```js\nimport { Switch } from '@orama/switch'\nimport { create } from '@orama/orama'\n\nconst db = await create({\n  schema: {\n    productName: 'string',\n    price: 'number'\n  }\n})\n\nconst orama = new Switch(client)\n\nconst results = await orama.search({\n  term: 'noise cancelling headphones',\n  where: {\n    price: {\n      lte: 99.99\n    }\n  }\n})\n```\n\n## License\n\n[Apache 2.0](/LICENSE.md)\n\n<!-- Skill/Rule: tokenizers Documentation (packages/tokenizers/README.md) -->\n# Orama Tokenizers\n\nThis package provides support for additional tokenizers for the Orama Search Engine.\n\nAvailable tokenizers:\n\n- Chinese (Mandarin, experimental)\n- Japanese (experimental)\n- Korean (experimental)\n\nUsage:\n\n```js\nimport { create } from \"@orama/orama\";\nimport { createTokenizer } from \"@orama/tokenizers/mandarin\";\n\nconst db = await create({\n  schema: {\n    myProperty: \"string\",\n    anotherProperty: \"number\",\n  },\n  components: {\n    tokenizer: await createTokenizer(),\n  },\n});\n```\n\n# License\n\n[Apache 2.0](/LICENSE.md)\n\n\n</agent_rules>"}