[ENG-681] Update indexer rules
so I guess we'll need to wait for updating indexing rules to exist for that, no worries
We should be able to? They’re all stored in the DB after all
We should also be able to see the contents of the system indexer rules, no? could be helpful for tech users.
Re-index i guess
probs worth asking @jamie
at rule update
Just note that eagerly re-indexing every location at rule update can be pretty expensive
@ericson.ds999 so are you recommending the shallow indexing? We could have a toast show up with re-index button on rule update to give user the choice
Not exactly, but you got me thinking. After updating an indexer rule we can show a modal in the frontend, warning the user with the list of locations that will be affected. Saying that the user can eagerly re-index them (maybe showing buttons to directly re-index as you pointed) or just keep using app and these locations will be updated directory by directory as the user opens them. What you guys think? @utkubakir @jamiepine
What if user never opens that folder? We will have that folder/file in our database for no reason at all.
Can we make a job to scan the database with those indexer rules in mind? Like instead of going through each file, it would directly search for it on the database. For example: FilePaths starting with "downloads/" or something? Triggering this job after each update doesn't sound bad to me.
@Brendonovich any feedback on the possibility of this query with prisma?
Indexer rules can contain globs and be rather complex - SQLite, nevermind Prisma, can't handle that. It'd have to be done in Rust. Also, that doesn't account for files that haven't been indexed yet, which would require a complete re-index to detect.
So the best way for us is basically re-index the location and hope for the best