How to search in Elastic by post title/concerpt/content?

posts_where is a filter, not an action. Also you should concatenate your modification with the query and return $where. Look at the reference.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)