Just a quick Sample app showing how the Search Interface works.
According to Jarek Wilkiewicz's answer on this thread on Google+, the function only works with apps that have been published to the Play Store, and not when creating a new app and debugging it. So to manually trigger the Intent you can issue the followin command in a CLI:
adb shell am start -a com.google.android.gms.actions.SEARCH_ACTION -e query foo <app package name here>
This isn't ideal at all, but it provides a way to test the intent out.