Commit graph

8 commits

Author SHA1 Message Date
Michael Mayer
0cecb5287f Search: Match folder album_path case-insensitively #5724
Folder search lowercases the query term, but album_path is VARBINARY and
compared byte-exact (case-sensitive) on MySQL/MariaDB, so a lowercased
term no longer matched uppercase folder paths. A parent folder still
appeared via its case-insensitive title, while child folders - matchable
only by path - dropped out of the results.

Add a dialect-aware PathLike helper: MySQL converts album_path to a
case-insensitive collation for the LIKE, SQLite and other dialects fall
back to a plain LIKE (SQLite is already ASCII case-insensitive). Only the
folder search filter is affected; byte-exact album_path identity lookups
are unchanged, so emoji and case-distinct folders stay distinct.
2026-07-16 16:53:28 +00:00
Michael Mayer
85221460e9 Search: Use parameterized queries for user search input #5587 2026-05-17 13:46:20 +00:00
Michael Mayer
a2b7615c93 Go: Apply go fix modernizations across backend packages
Run `go fix ./...` and keep mechanical modernization updates.

- Replace `interface{}` with `any` in signatures and local types
- Apply formatter/style cleanups from go1.26 tooling
- Keep `omitempty` behavior-preserving simplifications suggested by fix
- No functional feature changes intended

Validation:
- go test ./... -run '^$' -count=1 (Go 1.26.0)
- GOTOOLCHAIN=go1.24.10 go test ./... -run '^$' -count=1

Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-20 03:54:33 +01:00
Michael Mayer
f07f46fec8 Backend: Clean up error handling and unit tests in internal/ packages
Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-09 12:00:33 +01:00
Michael Mayer
e5dc335bcf AI: Include NSFW flag & score when generating labels with Ollama #5232
Related issues: #5233 (reset command), #5234 (schedule for models)

Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-05 04:23:36 +02:00
Keith Martin
aa6c62abcb
Search: Add escaping capability for the characters "|" and "&" #5188
* Backend: Add query escape capability
* Tests: escape capability verification
* Backend: Clean up comments and remove commented out code.
2025-09-01 14:00:26 +02:00
Michael Mayer
04ac2a383e Search: Find pictures with a specific term in Title or Caption #4947
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-17 11:38:08 +02:00
Michael Mayer
43b2b39b51 Backend: Move search package to /internal/entity/search
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-02 07:39:39 +02:00
Renamed from internal/search/conditions.go (Browse further)