First version of search filter. This can be improve greatly.