Gmail filter “has the word” stopped working

gmailgmail-filters

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?

update

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>
    <id>tag:mail.google.com,2008:filters:1348814923241</id>
    <updated>2012-10-03T02:29:35Z</updated>
    <author>
        <name>Radek</name>
        <email>radek@com</email>
    </author>
    <entry>
        <category term='filter'></category>
        <title>Mail Filter</title>
        <id>tag:mail.google.com,2008:filter:1348814923241</id>
        <updated>2012-10-03T02:29:35Z</updated>
        <content></content>
        <apps:property name='subject' value='EDUtester'/>
        <apps:property name='hasTheWord' value='fail'/>
        <apps:property name='label' value='testing/EDUtester/failed'/>
    </entry>
</feed>

Best Answer

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.