Update group by posts.id in search method

i used postgresql, and i found the error in search method, when change groubBy to posts.id it's fixed.