I am receiving emails with test results from overnight automation testing. I used different filters to label all testing emails. One of them is to make failed email with red label—easy to see if anything went wrong.

The filter "subject" = "EduTester" & "Has the words" = "fail" stopped working for some emails.

Even if I search for the word "fail" using the search box the emails that 100% contain the word are not found.

Going through my emails I can see that this stopped working on around 20.9.2012

My Ruby scripts generate the emails and I send them as plain text and also as HTML.

If I go to "Show original" of the email that wasn't found by both the filter & search and search for "fail" string, I get like 20 hits of fail. For example <BR>Overall&nbsp;result:&nbsp;fail<BR>

Any idea how to fix that?


the exported filter looks like

<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
    <title>Mail Filters</title>
        <category term='filter'></category>
        <title>Mail Filter</title>
        <apps:property name='subject' value='EDUtester'/>
        <apps:property name='hasTheWord' value='fail'/>
        <apps:property name='label' value='testing/EDUtester/failed'/>
  • Did you confirm that the two parts of the search/filter work? Does the filer find emails with the expected subject and emails with the "has the words" part only. Sep 28, 2012 at 10:04
  • In my question I said that Even if I search for the word "fail" using the search box the emails that 100% contain the word are not found. which is very strange. It used to work. How come the search won't find emails with a word that is obviously in the body?
    – Radek
    Sep 28, 2012 at 11:49

1 Answer 1


Two huge "secrets" to designing any truly powerful Google search are parenthesis () and curly brackets {}. Anything that is wrapped in parenthesis will do the same thing as searching with the terms using the AND operator. For example (pie cherry) will search for results that contain BOTH pie AND cherry. On the other side of things using curly brackets will give your results using the OR operator. For example {black white} will search for results that contain EITHER black OR white OR BOTH black and white

Within Gmail you can simple type the search into your search bar and then click the arrow at the right of the box which should expand to give you other options to narrow the search. Disregard the body of the expanded box and look at the bottom right corner and click on the "Create filter with this search" link.

So I would try to put in (subject:(EduTester) fail) for your search and then create the filter from this.

Sample expanded search box: Sample expanded search box.

  • The thing is that even searching using the search box doesn't find the emails that contain the text :-(
    – Radek
    Oct 2, 2012 at 23:43
  • Did you try to the search with the brackets, just to check if it makes a difference? Oct 2, 2012 at 23:46
  • Yes, I did try. fail , (fail) and {fail} gives me the same result.
    – Radek
    Oct 3, 2012 at 0:01
  • I know this sounds pretty obvious but at the top of the expanded search box it allows you to set the scope of the search. Have you double checked to ensure that it is indeed searching all mail and not just a subset? Oct 3, 2012 at 0:05
  • 1
    Such a specific date that completely changes the results would be the results of a Date search restriction in place. Could you check the date category to make sure that it is not set? If it is indeed not set then could you go to your filters, select this filter and the click on export. It should give you an XML formatted file of the filter that you could post for us to take a look at and then we may be able to find the problem from there. Oct 3, 2012 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.