Implementation of search on GenericDatabase.