not_.text_search() drops full-text search negation

Open Beginner friendly
#1,623 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, python
Domain
databases

Research direction

Start with the sync and async text_search() methods and compare them with the existing filter() path used by fts(). Add sync and async regression coverage for negated search modes, language configuration, and ensuring the next filter remains positive. Done means .not_.text_search() produces the not.plfts(...) form without affecting a subsequent filter.

Written by the indexing model from the issue text.

Description

bug Client Library - Python PostgREST python

Calling .not_.text_search(...) sends a positive full-text filter. For example:

client.table("documents").select("*").not_.text_search(
    "content", "cat", {"type": "plain", "config": "english"}
)

The current builder sends content=plfts(english).cat; the negated form is content=not.plfts(english).cat. The sync and async text_search() methods append parameters directly instead of going through filter(), which consumes negate_next. The convenience fts() methods already use filter().

This is the separate text_search case mentioned in #1616. #1619 changes or_() and does not change either text_search() method. I plan to route these methods through the existing filter path and add sync/async regressions for search modes, language configuration, and the next filter remaining positive.

Agent-assisted contribution: Codex inspected the current source and prepared this report under Bortlesboat's direction. No database writes or live Supabase requests were made.

Dominant language
Python
Stars
2.6k
Forks
554
Avg merge
2d 15h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/supabase-py

All issues in supabase/supabase-py

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.