All skills
simota avatar

/seek

@35ffd55
by shingo imotasimota/agent-skills85 stars
15

Designing search engines and vector DBs for full-text, vector, and hybrid retrieval, including permission-aware retrieval for multi-tenant or per-role corpora. Use for search design, index optimization, the RAG retrieval layer, or deciding where ACL filtering belongs in the query path.

Use this Skill: https://skilld.dev/gh/simota/agent-skills/seek

This session only. Nothing lands on disk.

referenceengine-comparison.md

≈2.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Search Engine Comparison Guide

Purpose: Decision framework for search engine and vector DB selection. Read when: Choosing between search engines or vector databases for a project.


Full-Text Search Engines

Feature Elasticsearch OpenSearch Meilisearch Typesense
License Elastic License 2.0 Apache 2.0 MIT GPL-3.0
Vector Search Yes (8.x+) Yes (2.x+) Yes (1.3+) Yes (0.25+)
Japanese kuromoji plugin kuromoji plugin Limited Limited
Aggregations Advanced Advanced Basic Basic
Learning Curve High High Low Low
Managed Services Elastic Cloud AWS OpenSearch Meilisearch Cloud Typesense Cloud
Best For Enterprise, complex search AWS-native, fork of ES Dev-friendly, small-medium Simple, typo-tolerant
Max Scale PB-scale PB-scale ~10M docs ~100M docs

Selection Guide

Is your data > 100M documents?
  ├─ Yes → Elasticsearch or OpenSearch
  │   ├─ AWS-native? → OpenSearch
  │   └─ Multi-cloud / on-prem? → Elasticsearch
  └─ No
      ├─ Need Japanese support? → Elasticsearch/OpenSearch
      ├─ Developer experience priority? → Meilisearch
      ├─ Typo tolerance critical? → Typesense
      └─ Already have ES expertise? → Elasticsearch

Vector Index Strategy (Quick Reference)

Engine Index Type Best For Trade-off
pgvector 0.8+ HNSW (iterative scan) <5M vectors, hybrid with RDBMS Iterative scan auto-expands; improved cost estimation
pgvector + pgvectorscale StreamingDiskANN <50M vectors, cost-sensitive Single-DB advantage, lower cost than dedicated vector DBs
pgvector 0.8+ IVFFlat (iterative scan) <500K vectors, batch workloads Faster build, iterative scan mitigates low-probe recall loss
Pinecone serverless Proprietary Zero-ops managed, BYOC available Pay-per-use; dedicated read nodes (early access)
Weaviate 1.28+ HNSW Multi-modal, enterprise RBAC BlockMax WAND speeds BM25/hybrid; RBAC tech preview
Qdrant 1.16+ HNSW + ACORN Heavy filtering + vector ACORN improves filtered search quality; tiered multitenancy
Milvus 2.6 HNSW, DiskANN, RaBitQ Billion-scale, cost-sensitive 1-bit RaBitQ quantization (~28% memory, 4× QPS); hot-cold tiered storage

Vector Databases

Feature pgvector Pinecone Weaviate Qdrant Milvus ChromaDB
Type Extension Managed SaaS Self-hosted/Cloud Self-hosted/Cloud Self-hosted/Cloud Embedded/Server
License PostgreSQL Proprietary BSD-3 Apache 2.0 Apache 2.0 Apache 2.0
Index Types HNSW, IVFFlat Proprietary HNSW HNSW, ACORN HNSW, IVF, DiskANN HNSW
Filtering SQL WHERE Metadata GraphQL + filters Payload filters (ACORN) Metadata Metadata
Hybrid Search tsvector + vector Sparse + dense BM25 + vector Sparse + dense BM25 + vector (v2.5+) Limited
Max Scale ~50M vectors (pgvectorscale) Billions 100M+ 100M+ Billions ~1M
Ops Complexity Low (part of PG) Zero (managed) Medium Medium Medium-High Low
Best For Existing PG, hybrid Managed serverless Multi-modal, RBAC Filtering + vector Large-scale open source Prototyping, small
Cost Free (PG cost) Pay-per-use (serverless) Free self-host Free self-host Free self-host Free

Notable recent changes (2024-2026):

Selection Guide

Already using PostgreSQL?
  ├─ Yes, < 5M vectors → pgvector HNSW (no new infra)
  ├─ Yes, 5-50M vectors → pgvector + pgvectorscale (StreamingDiskANN)
  └─ No or > 50M vectors
      ├─ Want zero ops? → Pinecone serverless
      ├─ Heavy filtering + vector? → Qdrant (ACORN algorithm)
      ├─ Multi-modal / enterprise RBAC? → Weaviate
      ├─ Billion-scale open source? → Milvus 2.6
      ├─ Rapid prototyping? → ChromaDB
      └─ Large scale + cost-sensitive? → Milvus self-hosted or Qdrant self-hosted

Hybrid Search Capability Comparison

Capability ES/OS 8.x pgvector + pg Weaviate 1.28+ Qdrant 1.16+ Milvus 2.5+
Native RRF Yes Manual (SQL) Yes Manual Yes
BM25 + kNN Yes (ELSER sparse) tsvector + vector Yes (BlockMax WAND) sparse + dense Yes (native BM25)
Neural Sparse ELSER v2 (Elastic) / Neural Sparse (OpenSearch) — — — sparsevec field
Cross-encoder rerank Plugin/app layer App layer Module App layer App layer
Filtered vector search Pre/post filter SQL WHERE GraphQL filter Payload filter (ACORN) Metadata filter
Multi-field boosting Yes Manual scoring Yes Manual Manual

Key sparse/hybrid notes:


Cost Comparison (Approximate Monthly)

Tier Elasticsearch Cloud AWS OpenSearch Pinecone Qdrant Cloud
Dev/Test $95 (2GB RAM) $30 (t3.small) $0 (starter) $0 (free tier)
Small Prod $250 (4GB, HA) $150 (m5.large) $70 (s1.x1) $25 (1GB)
Medium Prod $800 (16GB, HA) $500 (r5.xlarge) $250 (s1.x4) $100 (4GB)
Large Prod $2500+ (64GB+) $1500+ (custom) Custom $350+ (16GB)

Prices are approximate and vary by region and configuration.


Migration Paths

Elasticsearch → OpenSearch

  • API-compatible (mostly drop-in)
  • Main differences: licensing, some plugins, version numbering
  • Use snapshot/restore for data migration

Single DB → Dedicated Search

Phase 1: Add search engine alongside DB (dual-write or CDC)
Phase 2: Migrate read queries to search engine
Phase 3: Remove search-related indexes from primary DB
Phase 4: Optimize search engine configuration

pgvector → Dedicated Vector DB

Phase 1: Export embeddings to vector DB
Phase 2: Dual-read (query both, compare results)
Phase 3: Switch primary retrieval to vector DB
Phase 4: Keep pgvector as fallback / for joined queries

Source: SKILL.md on GitHub

No alerts13d4 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill 'seek' is a comprehensive design resource for search engines and vector databases. It promotes security best practices, such as retrieval authorization and multi-tenant isolation, and provides legitimate technical templates. No malicious patterns or security risks were identified.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 35ffd55. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/seek