mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
CLI: Provide a way to remove already indexed files from index #1018
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#1018
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rthomson83 on GitHub (Jul 8, 2021).
I've discovered what I believe to be an issue in the excluded files and folders after already being indexed. The only current way I can see is to reset the database to resolve. I've scoured the docs and cannot see anything that covers this scenario.
Expected
Adding a folder or file exclusion to ppignore should not only exclude from future index but purge any previews and folders from index.
Actual
Folder added to ppignore after an index has already run means the previews and folders are never removed.
Steps
@lastzero commented on GitHub (Jul 8, 2021):
There are
photoprism purgeandphotoprism cleanupcommands to refresh your index - however, they don't remove existing files matching (newly added) patterns in.gitignore. Same behaviour as with "git" (which uses.gitignorefiles), also to avoid accidental data loss if you got the pattern wrong so that it matches too much (or everything with*). We see that as a big risk.Advanced users can delete entries from their index via standard SQL, similar to updating them as described here:
https://github.com/photoprism/photoprism/issues/1395#issuecomment-871617580
@rthomson83 commented on GitHub (Jul 8, 2021):
I guess it's risky if you're actually deleting the original files but the way I'm thinking of, its just the actual index entries / previews.
That would be the equivalent in git terms of delete from index and keep local.
I mean I'm fine messing around with the SQL but it just felt like there ought to be a solution with a little less friction.
@lastzero commented on GitHub (Jul 19, 2021):
In the worst case you have to reindex everything, which may take days on a Raspberry Pi. Also you may lose metadata stored in your index only. We can look into this when we are done with high priority feature requests such as facial recognition and batch edit.
@charles-997 commented on GitHub (Sep 23, 2021):
Do you mean performing a "complete rescan" i.e. re-index the whole database?
Or something else. Although not ideal, I don't mind having to re-index my whole database.
That being said, I do agree with @lastzero that the best method would be to create a new command similar to
photoprism purgeandphotoprism cleanupthat will update the library based on any changes/additions to .ppignore file(s).@ndfan77 commented on GitHub (Jun 16, 2024):
Just wanted to chime in that IMHO this should NOT be low priority, and should be at the same priority as face recognition, etc.
It's just as important not to expose content/folders that shouldn't have been visible to begin with, as it is to have good face recognition results, etc.
How could it be considered practical or acceptable to expect a user to make a full trip through the full Originals folder contents looking for files/folders that shouldn't be exposed before the first index! And then not have an easy way to correct what shouldn't be exposed after the first index, without losing all UI/metadata changes and starting completely over?! (That's just almost crazy! :)