First thing I'd look at is to run the search from within the app to be sure there isn't some odd permissions situation.
Easiest way to do that is to go to Settings>User Interface>navigation menus>default.
add the following to the menus for the Traffic Light App(and correct some wierdness):
<nav search_view="search" color="#FDC95A">
<view name="traffic_light_examples" default='true' />
<view name="search" />
<view name="dashboards" />
</nav>
Now you'll have a link to the search view and dashboards and just make your life easier.
Run your search in the search view within the traffic light app.
That'll tell you whether your environment has some kind of unknown restrictions on your data access. (I can't think of why, but getting data from within the app is a good first step)
I would also add a panel to your test dashboard that just shows the statistics, that way you will see if you are getting data in that context and that will help you pinpoint where to troubleshoot. I don't see anything wrong with the search or your code.
So the only thing left is data retrieval and permissions. If it was the other way around, (not working in search app) then we'd know that because the Traffic App has APP permissions that you don't have access from the search app... the other way around is going to point to custom permissions or some nuance that isn't obvious unless you can poke around.
... View more