Fixed search in the API
Fixed the postgres api search problem