Add InterSystems IRIS Document Store integration#485
Open
pedrohenrique-sc wants to merge 1 commit into
Open
Conversation
kacperlukawski
requested changes
May 25, 2026
| - [License](#license) | ||
|
|
||
| ## Overview | ||
| An integration of **InterSystems IRIS** database with [Haystack 2](https://haystack.deepset.ai/) by deepset. In IRIS, the native `VECTOR(DOUBLE, N)` type is used for storing document embeddings, and the `VECTOR_COSINE` function enables high-performance dense retrievals using SIMD operations. |
Member
There was a problem hiding this comment.
Since it's planned to be published on Haystack's website, I don't think we need a link to Haystack2, although our users would appreciate a link to InterSystems IRIS.
Comment on lines
+33
to
+37
| In addition to the IRISDocumentStore, the library includes the following Haystack components which can be used in a pipeline: | ||
|
|
||
| - IRISEmbeddingRetriever - A component used to query the vector store and find semantically related Documents. It uses VECTOR_COSINE natively in the database. | ||
|
|
||
| - IRISBm25Retriever - A keyword-based retriever that implements Okapi BM25 over the stored documents. |
Member
There was a problem hiding this comment.
Suggested change
| In addition to the IRISDocumentStore, the library includes the following Haystack components which can be used in a pipeline: | |
| - IRISEmbeddingRetriever - A component used to query the vector store and find semantically related Documents. It uses VECTOR_COSINE natively in the database. | |
| - IRISBm25Retriever - A keyword-based retriever that implements Okapi BM25 over the stored documents. | |
| In addition to the `IRISDocumentStore`, the library includes the following Haystack components which can be used in a pipeline: | |
| - `IRISEmbeddingRetriever` - A component used to query the vector store and find semantically related Documents. It uses `VECTOR_COSINE` natively in the database. | |
| - `IRISBm25Retriever` - A keyword-based retriever that implements Okapi BM25 over the stored documents. |
|
|
||
| Note: For the examples below, you will also need an embedder like sentence-transformers. | ||
|
|
||
| **Requires:** Python 3.10+ (Recommended/Tested on 3.12) and a running InterSystems IRIS instance. |
Member
There was a problem hiding this comment.
I would advice running it against all the supported python versions.
|
|
||
| ## Usage | ||
|
|
||
| Once installed, you can start using ``IRISDocumentStore`` as any other document stores that support embeddings. |
Member
There was a problem hiding this comment.
Suggested change
| Once installed, you can start using ``IRISDocumentStore`` as any other document stores that support embeddings. | |
| Once installed, you can start using `IRISDocumentStore` as any other document stores that support embeddings. |
|
|
||
| Quick Start | ||
|
|
||
| Create a ```.env``` file using ```.env.example``` template and import the default config credentials for IntersystemsIris. |
Member
There was a problem hiding this comment.
Suggested change
| Create a ```.env``` file using ```.env.example``` template and import the default config credentials for IntersystemsIris. | |
| Create a `.env` file using `.env.example` template and import the default config credentials for IntersystemsIris. |
Wouldn't that create a block of code, instead of inline one?
Comment on lines
+185
to
+190
| This integration introduces: | ||
|
|
||
| - `IRISDocumentStore` A DocumentStore backed by InterSystems IRIS | ||
| - `IRISEmbeddingRetriever`Retrieve documents from `IRISDocumentStore` by embedding similarity. | ||
|
|
||
| - `IRISBm25Retriever ` Retrieve documents from `IRISDocumentStore` using Okapi BM25. |
Member
There was a problem hiding this comment.
Suggested change
| This integration introduces: | |
| - `IRISDocumentStore` A DocumentStore backed by InterSystems IRIS | |
| - `IRISEmbeddingRetriever`Retrieve documents from `IRISDocumentStore` by embedding similarity. | |
| - `IRISBm25Retriever ` Retrieve documents from `IRISDocumentStore` using Okapi BM25. | |
| This integration introduces: | |
| - `IRISDocumentStore` A DocumentStore backed by InterSystems IRIS | |
| - `IRISEmbeddingRetriever`Retrieve documents from `IRISDocumentStore` by embedding similarity. | |
| - `IRISBm25Retriever ` Retrieve documents from `IRISDocumentStore` using Okapi BM25. |
| IRIS_PASSWORD="SYS" | ||
| ``` | ||
| ### Example (RAG) | ||
|
|
Member
There was a problem hiding this comment.
Could you please describe the goal of this example? I would also advice splitting it into indexing and search.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds InterSystems IRIS to the Haystack integrations
InterSystems IRIS is an enterprise-grade, high-performance multimodel data platform that features a native
VECTORSQL type andVECTOR_COSINEsimilarity function. It is widely used in healthcare, finance, and logistics for handling massive, mission-critical workloads.This integration includes the following components for Haystack 2.x:
IRISDocumentStore: A production-ready DocumentStore backed by InterSystems IRIS.IRISEmbeddingRetriever: Retrieves documents from theIRISDocumentStoreusing vector embedding similarity.IRISBm25Retriever: Retrieves documents from theIRISDocumentStoreusing Okapi BM25 keyword-based search.Use case:
Enterprise data architectures often require keeping generative AI workloads close to the transactional or legacy data without duplicating it into standalone vector databases.
By adding this integration, developers can:
IRISEmbeddingRetriever(semantic search) andIRISBm25Retriever(lexical search) to improve retrieval accuracy.Documentation:
Full documentation and usage examples can be found here: InterSystems Iris DocumentStore