PHP API Integration of Elastic Search

I want to implement the Elastic search in the basic PHP code but i am unable to configure it

What is the specific problem you are facing? Do you see any error messages that you could paste here?