Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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>
share|improve this question
    
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. –  mhoran_psprep Sep 28 '12 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 '12 at 11:49
add comment

1 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.

share|improve this answer
    
The thing is that even searching using the search box doesn't find the emails that contain the text :-( –  Radek Oct 2 '12 at 23:43
    
Did you try to the search with the brackets, just to check if it makes a difference? –  Bradley A. Tetreault Oct 2 '12 at 23:46
    
Yes, I did try. fail , (fail) and {fail} gives me the same result. –  Radek Oct 3 '12 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? –  Bradley A. Tetreault Oct 3 '12 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. –  Bradley A. Tetreault Oct 3 '12 at 0:31
show 9 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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