Skip to content

iris-haystack

  • DocumentStore


    Full Haystack 2.x protocol implementation backed by InterSystems IRIS native VECTOR(DOUBLE, N) type.

    Getting Started

  • Semantic Search


    IRISEmbeddingRetriever uses IRIS native VECTOR_COSINE with SIMD optimisation — no external vector DB required.

    Embedding Retriever

  • Keyword Search


    IRISBm25Retriever implements Okapi BM25 in-memory over the filtered document set.

    BM25 Retriever

  • Metadata Filtering


    Uses Haystack's official document_matches_filter — identical behaviour to InMemoryDocumentStore, all Python types supported.

    Filtering


What is iris-haystack?

iris-haystack integrates InterSystems IRIS as a DocumentStore for the Haystack 2.x framework. It lets you store documents, embeddings, and metadata in IRIS and retrieve them with semantic or keyword-based search — without maintaining a separate vector database.

from haystack import Document
from intersystems_iris_haystack.document_stores import IRISDocumentStore

store = IRISDocumentStore(embedding_dim=384)

store.write_documents([
    Document(content="IRIS is a multimodel database.", meta={"category": "db"}),
    Document(content="Haystack builds LLM pipelines.",  meta={"category": "ai"}),
])

print(store.count_documents())

Why IRIS?

Capability What it means for you
VECTOR(DOUBLE, N) column Embeddings stored natively in SQL — no separate vector DB
VECTOR_COSINE function SIMD-optimised cosine similarity computed by the database engine
ANN / HNSW index Approximate nearest-neighbour search for large collections
SQL + JSON + globals One platform for relational data and vectors

Stack

intersystems-iris-haystack
├── IRISDocumentStore          ← Haystack 2.x protocol
├── IRISEmbeddingRetriever     ← VECTOR_COSINE via SQL
└── IRISBm25Retriever          ← Okapi BM25 in-memory

Credentials are managed via Haystack Secret — never hardcoded.


Quick install

pip install intersystems-iris-haystack

New here?

Start with the Prerequisites page, then follow Installation and Quick Start.