Skip to content

feat(search): negated and def property filters - #750

Merged
tobixen merged 2 commits into
masterfrom
negated-search
Oct 12, 2026
Merged

tobixen merged 2 commits into
masterfrom
negated-search

Conversation

@tobixen

@tobixen tobixen commented Oct 11, 2026

Copy link
Copy Markdown
Member

caldav's share of #568 (negated searches). Needs the !=/<>, !contains and def operators from icalendar-searcher (branch negation-operators, to be released as 1.1.0). The floor is raised to >=1.1.0, so CI fails until that release is out.

Code and this text are AI-generated (Claude Opus 5.5); the commit messages carry the prompts.

icalendar-searcher gains !=, !contains and def.  The XML builder sent
a positive text-match for != (the opposite result set) and raised
KeyError for def.  A negated text-match is a negated substring match,
so only !contains maps onto it; != and def become a bare prop-filter.
search() leaves all three out of the server query and filters
client-side (unless post_filter=False), until caldav-server-tester
probes negate-condition.

The icalendar-searcher floor goes to 1.1.0.

Ref: #568

Prompt: we may need a "does not contain"-operator, and the caldav side
 needs to be fixed.
Followup-Prompt: Add the icalendar-searcher floor in the caldav
 pyproject.toml file, even if it's not released yet.  That would cause
 the PR to fail quickly, rather than after running tests for half an
 hour, and it would avoid having to push another commit later.
Followup-Prompt: and force-push that as an amend [= the floor bump]
Followup-Prompt: #750 has to be rebased, and now the icalendar-searcher
 floor should be set to 1.1
 [#750; 1.1.0 is now on PyPI]

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
search() decides the negated-search operators client-side.  Record the
caldav-server-tester probe for negate-condition, after which servers
that honour it could be sent !contains, in the TODO list.

Ref: #568

Prompt: [fix issues found during the review process]

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
@tobixen
tobixen merged commit 586a49a into master Oct 12, 2026
18 checks passed
@tobixen
tobixen deleted the negated-search branch October 12, 2026 19:32
@tobixen tobixen mentioned this pull request Oct 20, 2026
tobixen added a commit that referenced this pull request Nov 18, 2026
Negated searches (2.1) landed in v3.5.0 apart from server detection
and functional tests; conflicts raise UidConflictError naming the
holder (4.1); non-GET redirects, PROPFIND included, are followed on
the same origin with a loop limit (4.3).  Closed issues 71, 94, 612
and 680 are ticked.

#750
#833
#837

Prompt: Please check all the checkboxes that should be checked [in the
  NLnet-funded roadmaps, while drafting payment requests]

Assisted-By: Claude Opus 5.5 (Claude Code)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant