A plugin allows to search in all opened files (even unsaved) or files in a given directory. In the later case it allows to specify if subdirectories should also be scaned and has a way to specify which files to search in.
There are two similar plugins available at Gedit page, but they don't meet the above requirements fully. So I spent an evening studying how to write plugins in python and here is the result!