Command
curl -X GET 'http://localhost:9200/my_index/_search?q=name:John&pretty'
Examples
Search users by username
curl -X GET 'http://localhost:9200/users/_search?q=username:alice&pretty'
curl -X GET 'http://localhost:9200/my_index/_search?q=name:John&pretty'
Search users by username
curl -X GET 'http://localhost:9200/users/_search?q=username:alice&pretty'