Python: Match a string

Only relevant for text and tsvector columns. Match only rows where column matches the query string in query.

Parameters

Examples

Text search

response = (
    supabase.table("texts")
    .select("content")
    .text_search(
        "content", 
        "'eggs' & 'ham'", 
        options={"config": "english"},
    )
    .execute()
)

Basic normalization

response = (
    supabase.table("quotes")
    .select("catchphrase")
    .text_search(
        "catchphrase",
        "'fat' & 'cat'",
        options={"type": "plain", "config": "english"},
    )
    .execute()
)

Full normalization

response = (
    supabase.table("quotes")
    .select("catchphrase")
    .text_search(
        "catchphrase",
        "'fat' & 'cat'",
        options={"type": "phrase", "config": "english"},
    )
    .execute()
)

Websearch

response = (
    supabase.table("quotes")
    .select("catchphrase")
    .text_search(
        "catchphrase",
        "'fat or cat'",
        options={"type": "websearch", "config": "english"},
    )
    .execute()
)