Beno Labs
Product Install Documentation Blog GitHub
Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
BenoStreamDB 0.16.0 documentation
BenoStreamDB 0.16.0 documentation

Getting Started

  • 2-Minute Quickstart
  • Installation
  • 🔄 Fluent Query API
  • Architecture: The Indexed Lakehouse

Architecture Decisions

  • ADR-001: Tightened Overlay Index Artifact Contract & Compound Puffin Bundles
  • ADR-002: Global Vector Clustering via Index-Only Compaction
  • ADR-003: Graph RAG Hybrid Memory (In-RAM State, Out-of-Core Edges)
  • ADR-004: Observability Pipeline (Registry, Exporters, OTLP)
  • ADR-005: SQL DDL and Maintenance Surface over the Core Table API
  • ADR-006: Trino Vector and Graph Pushdown via Table Functions
  • ADR-007: Native Connector Architecture, UDF Exposure, and Version Matrix
  • ADR-008: PendingCommit Transaction State Machine, Linearizable Reads, and Segmented WAL Recovery
  • ADR-009: Catalog Parity, Compare-and-Swap Hardening, and the Cross-Catalog Conformance Contract
  • ADR-010: Iceberg V3 Writes Must Be the Spec, and a Foreign Reader Is the Acceptance Test

Connectors & Integrations

  • Python Bindings
  • Apache Spark Connector
  • Trino Connector
  • Trino version bands and connector compatibility
  • dbt Adapter (dbt-benostreamdb)
  • Arrow Flight SQL Gateway (benostreamdb-flight)
  • Java JNI Integration
  • REST Search Gateway (benostreamdb-search)
  • Model Context Protocol (MCP) Server (benostreamdb-mcp)

Table Formats & Catalogs

  • Iceberg Compatibility Matrix
  • Iceberg V2/V3 API Documentation
  • Multi-Catalog Usage Guide

Query & Search

  • pgvector SQL Support Guide
  • Python Vector Distance API Reference
  • Graph RAG & Iceberg Edge Tables Guide
  • GPU Setup Guide for BenoStreamDB

Operations & Hardening

  • Configuration Guide
  • Concurrency and Atomic Commits
  • Resource Limits and Back-pressure
  • BenoStreamDB Admin CLI
  • BenoStreamDB Monitoring & Operations
  • BenoStreamDB Recovery Runbook
  • No-Panic Policy
  • Dependency Risk & Advisory Tracking Plan

Tutorials

  • Tutorial 1 — AI / semantic retrieval via MCP
  • Tutorial 2 — JSON / document retrieval with a JSON-path index
  • Tutorial 3 — Graph traversal via graph_neighbors(...)

Benchmarks & Evaluation

  • 1. The reproducibility contract
  • 2. Prerequisites
  • 3. Quick start
  • 3.1 Running the whole sweep
  • 4. Workload families
  • 5. Resource envelope
  • 6. Output schema
  • 7. Correctness oracles
  • 8. Regenerating the rollup and report
  • 9. How to read the numbers
  • 10. Troubleshooting
  • BenoStreamDB Benchmarking Plan
  • BenoStreamDB — Release Readiness Assessment

API Reference

  • Python API Reference
  • Rust API Reference

Roadmap

  • BenoStreamDB Roadmap & Architecture Status
Back to top
View this page

REST Search Gateway (benostreamdb-search)¶

benostreamdb-search is a multi-protocol HTTP search gateway that exposes BenoStreamDB tables over standard search engine wire formats.


Overview¶

The search gateway runs as a standalone daemon (bsdb-search) and exposes two distinct REST interfaces simultaneously:

  1. OpenSearch / Elasticsearch 7.10 Wire Protocol (Port 9200): Drop-in support for text search, _bulk ingestion, _search queries, term aggregations, and Kibana/Grafana connectivity.

  2. Qdrant Vector REST Protocol (Port 6333): Compatibility for vector collections, point upserts, payload filtering, and nearest-neighbor search.

Compatibility Scope: The gateway implements a targeted compatibility subset covering mainstream ingestion, point lookups, and search endpoints. It does not replicate entire distributed cluster management features (e.g. cross-cluster replication, scripting, or Lucene plugin architectures). Review the specific compatibility matrices below for exact supported APIs:

  • OpenSearch / Elasticsearch 7.10 Compatibility Matrix

  • Qdrant Compatibility Matrix


⚠️ Deployment Security¶

  • Stateless Authentication: Supports static API keys (BSDB_API_KEY) and JWT verification. Keys are accepted via Authorization: Bearer <token>, Authorization: ApiKey <token>, or the api-key header.

  • No TLS: The search gateway does not provide native TLS termination. Bind to 127.0.0.1 or an internal VPC subnet behind a reverse proxy that terminates TLS.


Configuration¶

Variable

Description

Default

BSDB_SEARCH_BIND

Bind address for OpenSearch REST server

0.0.0.0

BSDB_SEARCH_PORT

Port for OpenSearch / ES 7.10 REST server

9200

BSDB_QDRANT_BIND

Bind address for Qdrant REST server

Matches search bind

BSDB_QDRANT_PORT

Port for Qdrant REST server

6333

BSDB_SEARCH_STORAGE_URI

Base storage URI for indices and collections

./data

BSDB_API_KEY

Shared secret API key

Unset

BSDB_WAL_DURABILITY

Ingestion durability ("async" for batching, "sync" for fsync)

"async"

BSDB_SEARCH_AUTO_REFRESH_SECS

Background flush interval for memory buffers

1.0


Running the Gateway¶

# Start gateway listening on ports 9200 and 6333
bsdb-search --bind 127.0.0.1 --port 9200 --storage-uri s3://my-bucket/search

Client Usage Examples¶

1. OpenSearch / Elasticsearch REST API (Port 9200)¶

# Cluster health check
curl -H "Authorization: Bearer $BSDB_API_KEY" http://localhost:9200/_cluster/health

# Create an index
curl -X PUT http://localhost:9200/articles -H "Content-Type: application/json" -d '{
  "mappings": {
    "properties": {
      "title": { "type": "text" },
      "category": { "type": "keyword" }
    }
  }
}'

# Ingest a document
curl -X POST http://localhost:9200/articles/_doc/1 -H "Content-Type: application/json" -d '{
  "title": "BenoStreamDB Lakehouse Search",
  "category": "database"
}'

# Search documents
curl -X POST http://localhost:9200/articles/_search -H "Content-Type: application/json" -d '{
  "query": {
    "match": { "title": "Lakehouse" }
  }
}'

# Rebuild table-level cluster index into <= 512 MiB Puffin shards
curl -X POST http://localhost:9200/articles/_rebuild_cluster -H "Content-Type: application/json" -d '{
  "column": "vector",
  "k": 1024,
  "m": 16,
  "ef_construction": 200,
  "target_shard_mb": 512
}'

# Pre-warm Voronoi centroid routes and active shards into RAM
curl -X POST http://localhost:9200/articles/_warmup -H "Content-Type: application/json" -d '{
  "n_probes": 500,
  "max_memory_gb": 8.0
}'

2. Qdrant REST API (Port 6333)¶

from qdrant_client import QdrantClient

# Connect to the BenoStreamDB Qdrant interface
client = QdrantClient(url="http://localhost:6333", api_key="your-api-key")

# List collections (maps to BenoStreamDB tables)
collections = client.get_collections()

# Search points
results = client.search(
    collection_name="embeddings",
    query_vector=[0.12, 0.45, -0.23],
    limit=5
)
for r in results:
    print(r.id, r.score, r.payload)
Next
Model Context Protocol (MCP) Server (benostreamdb-mcp)
Previous
Java JNI Integration
Copyright © 2026, Beno Labs and BenoStreamDB Contributors
Made with Sphinx and @pradyunsg's Furo
On this page
  • REST Search Gateway (benostreamdb-search)
    • Overview
    • ⚠️ Deployment Security
    • Configuration
    • Running the Gateway
    • Client Usage Examples
      • 1. OpenSearch / Elasticsearch REST API (Port 9200)
      • 2. Qdrant REST API (Port 6333)