Skip to content

feat: Oracle AI Vector Search DocumentStore #3095

@fede-kamel

Description

@fede-kamel

Summary

Oracle Database 23ai/26ai ships a native VECTOR data type with vector_distance() SQL, HNSW/IVF indexing, and ANN search — all included in the database license (including the Free Tier on OCI). There is currently no Oracle integration in haystack-core-integrations, which means Oracle users must leave the Haystack ecosystem to do RAG.

This issue tracks adding OracleDocumentStore and OracleEmbeddingRetriever as a first-class integration.

Proposed package: oracle-haystack

Located at integrations/oracle/, the package provides:

  • OracleDocumentStore — full Haystack DocumentStore protocol
    • write_documents with all three DuplicatePolicy modes (INSERT / MERGE)
    • filter_documents with Haystack filter grammar → JSON_VALUE SQL
    • delete_documents, count_documents, async variants
    • to_dict / from_dict with Secret-wrapped credentials
  • OracleEmbeddingRetriever@component with filter merging and arun
  • create_hnsw_index()CREATE VECTOR INDEX … ORGANIZATION INMEMORY NEIGHBOR GRAPH
  • ADB-S wallet support — Oracle Autonomous Database thin-mode connections (no Instant Client)

Oracle AI Vector Search highlights

  • VECTOR(dim, FLOAT32) column type, stored alongside relational data
  • FETCH APPROX FIRST N ROWS ONLY activates the HNSW index automatically
  • COSINE, EUCLIDEAN, DOT distance metrics
  • JSON column type for metadata with JSON_VALUE path expressions
  • Available in Oracle DB 23ai Free (on-prem) and Oracle Autonomous Database Free Tier (OCI)

Validation

Tested end-to-end against Oracle AI Database 26ai on OCI Free Tier:

  • 200 SQuAD Wikipedia passages written at 181 docs/sec
  • HNSW index built in 0.7s
  • Retrieval latency < 700ms (including ADB network round-trip)
  • 34 unit tests + 13 integration tests passing

PR

A ready-to-review PR is attached to this issue.

Metadata

Metadata

Assignees

Labels

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions