Skip to content

SupabaseGroongaDocumentStore and SupabaseGroongaRetriever #3083

@davidsbatista

Description

@davidsbatista

Implement SupabaseGroongaDocumentStore and SupabaseGroongaRetriever for full-text search powered by PGroonga, a PostgreSQL extension for fast, multilingual full-text search exposed by Supabase.

Detailed design

This retriever works without embeddings, complementing dense retrieval in hybrid search pipelines.

from haystack_integrations.document_stores.supabase import SupabaseGroongaDocumentStore
from haystack_integrations.components.retrievers.supabase import SupabaseGroongaRetriever

document_store = SupabaseGroongaDocumentStore(
    supabase_url="https://<project>.supabase.co",
    supabase_key=Secret.from_env_var("SUPABASE_SERVICE_KEY"),
    table_name="haystack_fts_documents",
)

retriever = SupabaseGroongaRetriever(document_store=document_store, top_k=10)

Implementation notes

  • Primary dependency: supabase-py
  • Auth via supabase_url and supabase_key (using Secret for secure handling)
  • PGroonga must be enabled on the Supabase project — document this as a prerequisite
  • Supports multilingual tokenization, relevant for non-English use cases
  • Can be used alongside SupabasePgvectorEmbeddingRetriever in hybrid pipelines
  • Integration lives in integrations/supabase/

Checklist

  • The code is documented with docstrings and was merged into a feature branch

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions