I think you're pretty on-track. My suggestion though would be to move this
to a filter query. This still leaves you with the problem of having to remember
to change the query logic later, but at least makes this inexpensive after
the first go.
And you probably want something like:
Hi,
I've introduced a new boolean field "is_deleted_b_ns" on my objects which I
index with Solr. I am using dynamic field definitions ("b" indicating Boolean,
"ns" for "not stored").
Since the field did not exist while the index was built, none of my documents
currently has that field