Unfortunately, this is not actually a
$search query. The good thing about the question the question, though, is that the
reasonLost field suggests that this query is a good fit for Atlas Search and would likely be lightning fast. I’ve put some details on how to solve this problem with Atlas Search below.
It is possible to search by dates but you first need to create a search index with
date type for
reasonLost. Then it will be relatively easy. As an FYI,
mustNot in Atlas Search.
An index definition that would satisfy this query is:
And a query, assuming your index is named
default that would satisfy the requirement would be:
query: 'Existing Customer',