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
Implement
SupabaseGroongaDocumentStoreandSupabaseGroongaRetrieverfor 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.
Implementation notes
supabase-pysupabase_urlandsupabase_key(usingSecretfor secure handling)SupabasePgvectorEmbeddingRetrieverin hybrid pipelinesintegrations/supabase/Checklist