> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datris.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Semantic search (all vector stores)

> Search a vector store using natural language. One endpoint serves every supported store — the `{store}` path segment selects it. Generates an embedding from the query and returns the most similar document chunks. Connection and embedding secrets are always resolved server-side from the server's configuration; any client-supplied secret names are ignored. Request fields vary slightly per store — qdrant, milvus, and chroma name their container with `collection`, weaviate with `className`, pgvector with `table` (plus an optional `schema`).



## OpenAPI

````yaml /openapi.yaml post /api/v1/search/{store}
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.11.3
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/search/{store}:
    post:
      tags:
        - Search
      summary: Semantic search (all vector stores)
      description: >-
        Search a vector store using natural language. One endpoint serves every
        supported store — the `{store}` path segment selects it. Generates an
        embedding from the query and returns the most similar document chunks.
        Connection and embedding secrets are always resolved server-side from
        the server's configuration; any client-supplied secret names are
        ignored. Request fields vary slightly per store — qdrant, milvus, and
        chroma name their container with `collection`, weaviate with
        `className`, pgvector with `table` (plus an optional `schema`).
      parameters:
        - name: store
          in: path
          required: true
          schema:
            type: string
            enum:
              - qdrant
              - weaviate
              - milvus
              - chroma
              - pgvector
          description: Vector store to search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                  description: Natural language search query
                collection:
                  type: string
                  default: documents
                  description: Collection name (qdrant, milvus, and chroma only)
                className:
                  type: string
                  default: Documents
                  description: Weaviate class name, PascalCase (weaviate only)
                table:
                  type: string
                  default: documents
                  description: PostgreSQL table name (pgvector only)
                schema:
                  type: string
                  default: public
                  description: PostgreSQL schema (pgvector only)
                topK:
                  type: integer
                  default: 5
                  description: Number of results to return
      responses:
        '200':
          description: Search results with similarity scores
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: >-
            User-actionable error, returned as a plain message. Sent for an
            unknown or unavailable `{store}` (the message names the valid
            stores, e.g. "Unknown vector store: 'faiss'. Valid stores: chroma,
            milvus, pgvector, qdrant, weaviate"), a missing `query`, or an
            embedding dimension mismatch between ingest and query.
        '500':
          description: Error
components:
  schemas:
    SearchResponse:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              text:
                type: string
              chunk_index:
                type: integer
              source_pipeline:
                type: string
              filename:
                type: string
              _score:
                type: number
        count:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````