Exclude Trash from search

I’m going through an indexed folder after searching for a specific keyword and deleting items from that list (search result). When I press delete the item gets moved to the Trash, the location changes to “DatabaseName > Trash” and it appears in strikethrough. But it’s still in the list.

Is there a way to exclude the trashed items from the search result? I’ve more often come across situations where a criteria based on the location would be helpful. Would it be possible to implement such a criterium? It’s already available as location in scripts so would be great to also have it available in search (and possibly smart rules?)

A file can have more than one parent - replicants - so the location will not necessarily refer to a specific parent group. In fact, it will point to the first parent group where the file was created or imported.

When I press delete the item gets moved to the Trash, the location changes to “DatabaseName > Trash” and it appears in strikethrough. But it’s still in the list.

The Trash is still a location in a database.
What do you see after refreshing the search?

I understand and if location would point to the first parent that would be perfectly fine. It’s also how the location parameter works in Applescript as well as the subtext in search results right? A criterium could even be called “First parent” to make this clear.

It’s removed from view after a refresh. I thought it worked that way too with other searches, like searching for a tag, then removing that tag and that the item would be automatically removed from search results. But it’s not the case apparentlly, search is not auto-refreshing.

It’s somewhat confusing because e.g. the counts for a smart group are (live) updated, while the view is not. I imagine there would be preferences both ways. It would be great if auto-refresh of search would be an option / configurable - or maybe there’s some workaround?

Have a great weekend!

It’s also how the location parameter works in Applescript as well as the subtext in search results right? A criterium could even be called “First parent” to make this clear.

That might be fine for your specific case but what about people who want the second or third location? :thinking:

the counts for a smart group are (live) updated

Actually, that’s not always true.
Some smart groups are fast and update on-the-fly.
Others are slow and update when selected.

But what is “the first parent” of a replicant? I understood the concept to be like a set of pointers to the same location on disk. Where does any kind of order come into play in this situation? (But then I may misunderstand something).

The only “order” is the first created file. Unless you remember that, the location of replicants is moot.