orama
Oramaは、高速な全文検索とベクトル検索エンジンで、誤字脱字への寛容性、ファセット、フィルター、ハイブリッド検索などの機能を、外部インフラなしで実装できるよう開発者を支援するSkill。
📜 元の英語説明(参考)
Expert guidance for Orama, the fast full-text and vector search engine that runs everywhere — browser, server, and edge. Helps developers implement search with typo tolerance, facets, filters, and hybrid (keyword + vector) search without external infrastructure.
🇯🇵 日本人クリエイター向け解説
Oramaは、高速な全文検索とベクトル検索エンジンで、誤字脱字への寛容性、ファセット、フィルター、ハイブリッド検索などの機能を、外部インフラなしで実装できるよう開発者を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o orama.zip https://jpskill.com/download/15217.zip && unzip -o orama.zip && rm orama.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15217.zip -OutFile "$d\orama.zip"; Expand-Archive "$d\orama.zip" -DestinationPath $d -Force; ri "$d\orama.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
orama.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
oramaフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Orama — フルテキスト & ベクトル検索エンジン
概要
Orama は、高速なフルテキストおよびベクトル検索エンジンであり、ブラウザ、サーバー、エッジのあらゆる場所で実行できます。開発者が外部インフラストラクチャなしで、タイプミス耐性、ファセット、フィルター、およびハイブリッド(キーワード + ベクトル)検索による検索を実装するのに役立ちます。
手順
基本的なフルテキスト検索
検索インデックスを設定してクエリを実行します。
// src/search/index.ts — 検索インデックスの作成と投入
import { create, insert, search, count } from "@orama/orama";
// スキーマを定義します — Orama は型を推論し、自動的にインデックスを構築します
const db = await create({
schema: {
title: "string",
content: "string",
category: "enum", // フィルタリング可能な enum 値
tags: "string[]", // 文字列の配列 (検索可能)
publishedAt: "number", // 範囲フィルター用の Unix タイムスタンプ
author: "string",
views: "number",
},
});
// ドキュメントを挿入します
await insert(db, {
title: "Getting Started with Orama Search",
content: "Orama is a blazing-fast full-text search engine that works in the browser, on the server, and at the edge. No external dependencies required.",
category: "tutorial",
tags: ["search", "javascript", "performance"],
publishedAt: Date.now(),
author: "Alex Chen",
views: 1250,
});
await insert(db, {
title: "Building Real-Time Search with React",
content: "Learn how to implement instant search in your React application using Orama. Sub-millisecond results with typo tolerance.",
category: "tutorial",
tags: ["react", "search", "ui"],
publishedAt: Date.now(),
author: "Marta Lopez",
views: 890,
});
// タイプミス耐性のある検索 (デフォルト: 有効)
const results = await search(db, {
term: "serch engne", // タイプミスは自動的に処理されます
properties: ["title", "content"], // 検索するフィールド
limit: 10,
offset: 0,
});
console.log(`Found ${results.count} results in ${results.elapsed.formatted}`);
// "Found 2 results in 0.12ms"
for (const hit of results.hits) {
console.log(`${hit.score.toFixed(2)} | ${hit.document.title}`);
}
フィルターとファセット
フルテキスト検索と構造化されたフィルタリングを組み合わせます。
// src/search/filtered.ts — フィルター、ファセット、およびソートによる検索
import { search } from "@orama/orama";
// フィルターによる検索
const filtered = await search(db, {
term: "search",
where: {
category: { eq: "tutorial" }, // enum の完全一致
publishedAt: { gt: Date.now() - 30 * 24 * 60 * 60 * 1000 }, // 過去 30 日間
views: { gte: 100, lte: 10000 }, // 範囲フィルター
tags: { containsAll: ["react"] }, // 配列にすべてが含まれている
},
sortBy: {
property: "views",
order: "DESC", // 最も人気のある順にソート
},
limit: 20,
});
// ファセット検索 — フィルターの集計カウントを取得します
const faceted = await search(db, {
term: "javascript",
facets: {
category: {
limit: 10, // 上位 10 件のカテゴリ
},
tags: {
limit: 20,
},
views: {
ranges: [
{ from: 0, to: 100 }, // 0-100 views
{ from: 100, to: 1000 }, // 100-1000 views
{ from: 1000, to: Infinity }, // 1000+ views
],
},
},
});
// フィルター UI を構築するためのファセット結果
console.log(faceted.facets);
// {
// category: { count: 2, values: { tutorial: 2, guide: 1 } },
// tags: { count: 5, values: { javascript: 3, react: 2, search: 2 } },
// views: { count: 3, values: { "0-100": 1, "100-1000": 2, "1000+": 1 } },
// }
ハイブリッド検索 (キーワード + ベクトル)
従来のテキスト検索とセマンティックベクトル検索を組み合わせます。
// src/search/hybrid.ts — BM25 とベクトルの類似性を組み合わせたハイブリッド検索
import { create, insert, search } from "@orama/orama";
import { pluginEmbeddings } from "@orama/plugin-embeddings";
import { OramaCloud } from "@orama/plugin-embeddings/dist/models";
// ベクトルをサポートするインデックスを作成します
const db = await create({
schema: {
title: "string",
content: "string",
category: "enum",
embedding: "vector[384]", // 384次元ベクトルフィールド
},
plugins: [
pluginEmbeddings({
embeddings: {
model: OramaCloud, // 組み込みの埋め込みモデル (API キーは不要)
// または OpenAI を使用: { model: "openai", apiKey: process.env.OPENAI_API_KEY }
documentProperties: ["title", "content"], // 埋め込むフィールド
defaultProperty: "embedding", // ここに埋め込みを保存します
},
}),
],
});
// 挿入 — 埋め込みは title + content から自動的に生成されます
await insert(db, {
title: "Kubernetes Pod Scheduling",
content: "Understanding how the Kubernetes scheduler assigns pods to nodes based on resource requests, affinity rules, and taints.",
category: "devops",
});
// ハイブリッド検索 — キーワードの関連性 (BM25) とセマンティックの類似性を組み合わせます
const results = await search(db, {
term: "how to deploy containers", // キーワード検索
mode: "hybrid", // "fulltext" | "vector" | "hybrid"
similarity: 0.8, // ベクトルの最小類似性しきい値
limit: 10,
});
// 純粋なベクトル検索 (セマンティックのみ、キーワードマッチングなし)
const semantic = await search(db, {
term: "container orchestration best practices",
mode: "vector",
similarity: 0.75,
});
React 統合
React フックで検索 UI を構築します。
// src/components/SearchBox.tsx — React によるインスタント検索
import { useSearch } from "@orama/react-components";
import { useState, useMemo } from "react";
export function SearchBox({ db }: { db: any }) {
const [query, setQuery] = useState("");
// useSearch は自動的にデバウンスし、読み込み状態を処理します
const { results, loading } = useSearch(db, {
term: query,
limit: 10,
properties: ["title", "content"],
facets: { category: { limit: 5 } },
});
return (
<div>
<input
type="search"
va 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Orama — Full-Text & Vector Search Engine
Overview
Orama, the fast full-text and vector search engine that runs everywhere — browser, server, and edge. Helps developers implement search with typo tolerance, facets, filters, and hybrid (keyword + vector) search without external infrastructure.
Instructions
Basic Full-Text Search
Set up a search index and query it:
// src/search/index.ts — Create and populate a search index
import { create, insert, search, count } from "@orama/orama";
// Define the schema — Orama infers types and builds indexes automatically
const db = await create({
schema: {
title: "string",
content: "string",
category: "enum", // Filterable enum values
tags: "string[]", // Array of strings (searchable)
publishedAt: "number", // Unix timestamp for range filters
author: "string",
views: "number",
},
});
// Insert documents
await insert(db, {
title: "Getting Started with Orama Search",
content: "Orama is a blazing-fast full-text search engine that works in the browser, on the server, and at the edge. No external dependencies required.",
category: "tutorial",
tags: ["search", "javascript", "performance"],
publishedAt: Date.now(),
author: "Alex Chen",
views: 1250,
});
await insert(db, {
title: "Building Real-Time Search with React",
content: "Learn how to implement instant search in your React application using Orama. Sub-millisecond results with typo tolerance.",
category: "tutorial",
tags: ["react", "search", "ui"],
publishedAt: Date.now(),
author: "Marta Lopez",
views: 890,
});
// Search with typo tolerance (default: enabled)
const results = await search(db, {
term: "serch engne", // Typos handled automatically
properties: ["title", "content"], // Which fields to search
limit: 10,
offset: 0,
});
console.log(`Found ${results.count} results in ${results.elapsed.formatted}`);
// "Found 2 results in 0.12ms"
for (const hit of results.hits) {
console.log(`${hit.score.toFixed(2)} | ${hit.document.title}`);
}
Filters and Facets
Combine full-text search with structured filtering:
// src/search/filtered.ts — Search with filters, facets, and sorting
import { search } from "@orama/orama";
// Search with filters
const filtered = await search(db, {
term: "search",
where: {
category: { eq: "tutorial" }, // Exact match on enum
publishedAt: { gt: Date.now() - 30 * 24 * 60 * 60 * 1000 }, // Last 30 days
views: { gte: 100, lte: 10000 }, // Range filter
tags: { containsAll: ["react"] }, // Array contains all
},
sortBy: {
property: "views",
order: "DESC", // Sort by most popular
},
limit: 20,
});
// Faceted search — get aggregated counts for filters
const faceted = await search(db, {
term: "javascript",
facets: {
category: {
limit: 10, // Top 10 categories
},
tags: {
limit: 20,
},
views: {
ranges: [
{ from: 0, to: 100 }, // 0-100 views
{ from: 100, to: 1000 }, // 100-1000 views
{ from: 1000, to: Infinity }, // 1000+ views
],
},
},
});
// Facet results for building filter UIs
console.log(faceted.facets);
// {
// category: { count: 2, values: { tutorial: 2, guide: 1 } },
// tags: { count: 5, values: { javascript: 3, react: 2, search: 2 } },
// views: { count: 3, values: { "0-100": 1, "100-1000": 2, "1000+": 1 } },
// }
Hybrid Search (Keyword + Vector)
Combine traditional text search with semantic vector search:
// src/search/hybrid.ts — Hybrid search combining BM25 and vector similarity
import { create, insert, search } from "@orama/orama";
import { pluginEmbeddings } from "@orama/plugin-embeddings";
import { OramaCloud } from "@orama/plugin-embeddings/dist/models";
// Create index with vector support
const db = await create({
schema: {
title: "string",
content: "string",
category: "enum",
embedding: "vector[384]", // 384-dimensional vector field
},
plugins: [
pluginEmbeddings({
embeddings: {
model: OramaCloud, // Built-in embedding model (no API key needed)
// Or use OpenAI: { model: "openai", apiKey: process.env.OPENAI_API_KEY }
documentProperties: ["title", "content"], // Which fields to embed
defaultProperty: "embedding", // Store embeddings here
},
}),
],
});
// Insert — embeddings are generated automatically from title + content
await insert(db, {
title: "Kubernetes Pod Scheduling",
content: "Understanding how the Kubernetes scheduler assigns pods to nodes based on resource requests, affinity rules, and taints.",
category: "devops",
});
// Hybrid search — combines keyword relevance (BM25) with semantic similarity
const results = await search(db, {
term: "how to deploy containers", // Keyword search
mode: "hybrid", // "fulltext" | "vector" | "hybrid"
similarity: 0.8, // Minimum vector similarity threshold
limit: 10,
});
// Pure vector search (semantic only, no keyword matching)
const semantic = await search(db, {
term: "container orchestration best practices",
mode: "vector",
similarity: 0.75,
});
React Integration
Build a search UI with React hooks:
// src/components/SearchBox.tsx — Instant search with React
import { useSearch } from "@orama/react-components";
import { useState, useMemo } from "react";
export function SearchBox({ db }: { db: any }) {
const [query, setQuery] = useState("");
// useSearch automatically debounces and handles loading state
const { results, loading } = useSearch(db, {
term: query,
limit: 10,
properties: ["title", "content"],
facets: { category: { limit: 5 } },
});
return (
<div>
<input
type="search"
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search articles..."
/>
{loading && <div className="spinner" />}
{results?.hits.map((hit) => (
<article key={hit.id}>
<h3>{hit.document.title}</h3>
<p>{hit.document.content.slice(0, 150)}...</p>
<span>Score: {hit.score.toFixed(2)}</span>
</article>
))}
{/* Facet filters */}
{results?.facets?.category && (
<div className="filters">
{Object.entries(results.facets.category.values).map(([cat, count]) => (
<button key={cat}>{cat} ({count})</button>
))}
</div>
)}
</div>
);
}
Persistence and Serialization
Save and restore indexes:
// src/search/persistence.ts — Persist search index to disk or storage
import { create, save, load } from "@orama/orama";
import { persistToFile, restoreFromFile } from "@orama/plugin-data-persistence";
import fs from "fs";
// Save index to a file (server-side)
const serialized = await save(db);
fs.writeFileSync("search-index.json", JSON.stringify(serialized));
// Restore index from file
const data = JSON.parse(fs.readFileSync("search-index.json", "utf-8"));
const restored = await load(data);
// Binary format — smaller and faster to load
const binary = await persistToFile(db, "binary", "search-index.msp");
const fromBinary = await restoreFromFile("binary", "search-index.msp");
Installation
# Core library
npm install @orama/orama
# Plugins (optional)
npm install @orama/plugin-embeddings # Vector/hybrid search
npm install @orama/plugin-data-persistence # Save/load indexes
npm install @orama/react-components # React hooks
Examples
Example 1: Integrating Orama into an existing application
User request:
Add Orama to my Next.js app for the AI chat feature. I want streaming responses.
The agent installs the SDK, creates an API route that initializes the Orama client, configures streaming, selects an appropriate model, and wires up the frontend to consume the stream. It handles error cases and sets up proper environment variable management for the API key.
Example 2: Optimizing filters and facets performance
User request:
My Orama calls are slow and expensive. Help me optimize the setup.
The agent reviews the current implementation, identifies issues (wrong model selection, missing caching, inefficient prompting, no batching), and applies optimizations specific to Orama's capabilities — adjusting model parameters, adding response caching, and implementing retry logic with exponential backoff.
Guidelines
- Define schema upfront — Orama builds optimized indexes based on your schema; don't use generic
stringfor everything - Use enums for filters — Fields you filter by exact match should be
enum, notstring— much faster - Limit search properties — Specify which fields to search in; searching all fields is slower and less relevant
- Pre-build indexes — For static content (docs, blog), build the index at build time and ship it as a JSON file
- Hybrid for best results — Pure keyword search misses synonyms; pure vector misses exact terms; hybrid combines both
- Serialize for SSR — Build the index server-side, serialize it, and hydrate on the client for instant search
- Use facets for filter UIs — Let Orama compute filter counts instead of running separate queries
- Binary persistence for large indexes — JSON serialization is fine for <10K docs; use binary format for larger datasets