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.13.1 documentation
BenoStreamDB 0.13.1 documentation

Getting Started

  • 2-Minute Quickstart
  • Installation
  • 🔄 Fluent Query API
  • Architecture: The Indexed Lakehouse
  • ADR-001: Tightened Overlay Index Artifact Contract & Compound Puffin Bundles

Connectors & Integrations

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

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

  • Benchmarking: how to reproduce every number
  • 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_SEARCH_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" }
  }
}'

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
Arrow Flight SQL Gateway (benostreamdb-flight)
Copyright © 2026, BenoStream Team
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)