I'm trying to use the Search API to locate search terms in the body and attachments of emails.
It seems that when I use code like the following, I don't get any hits on the body of the message.
query.AddTerm(IndexProperties.IndexPropText, "John Smith",(int)ESearchQueryFlags.ESQphrase);
But when I search like this, I get hits.
query.AddTerm(IndexProperties.IndexPropText, "John Smith",(int)ESearchQueryFlags.ESQall);
The problem is that I want to find hits only where both the "John: and "Smith" are near each other. Not "Smith" and "John" as stand alones. I've also tried the ESQAllnear option, but this didn't seem to help.
Any advice?