]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Fix] Improve atom polarity detection in composites inverted index
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 26 Nov 2025 09:18:26 +0000 (09:18 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 26 Nov 2025 09:18:26 +0000 (09:18 +0000)
commit8f3585335a3d4c08e65fa48641f9be7bee260403
tree4c38e3a96f522766ea225ff093612924dd35cada
parentdd9935d9f983c2fc3827e0d6e052f0c4ca305098
[Fix] Improve atom polarity detection in composites inverted index

Count NOT operations from atom to root instead of just checking direct
parent. This correctly handles nested negations like !(A & B) where
atoms A and B are both under negation even though their direct parent
is AND, not NOT.

- Even number of NOTs = positive atom (must be true)
- Odd number of NOTs = negative atom (must be false)
src/libserver/composites/composites_manager.cxx