Commit 290866f
cat101
fix: handle NULL title when negating any_text / title: search
Wrap the title LIKE clause in a Brackets predicate that also matches
'media.metadata.title IS NULL' when the query is negated. Without this,
photos with no title (the common case) are excluded from negated any_text
results because NULL NOT LIKE 'x' evaluates to NULL (three-valued logic),
which fails the AND-chain that negation builds.
Mirrors the existing pattern used for array fields (keywords/persons) at
matchArrayField — text-typed sparse fields need the same treatment.1 parent 373586e commit 290866f
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1028 | 1031 | | |
1029 | | - | |
1030 | | - | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1031 | 1041 | | |
1032 | 1042 | | |
1033 | 1043 | | |
| |||
0 commit comments