How to write put mapping api using php code

how to write put mapping api using php code. currently iam using curl command

curl -X PUT "localhost:9200/new-index/_mapping" -H 'Content-Type: application/json' -d' {"properties": { "new-email": {"type": "keyword"}}}'

please help me to convert this curl command to php code

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.