1. create index
curl -X PUT http://localhost:9200/A
2. check the created index
curl -X GET http://localhost:9200/_cat/indices?v&index=A
3. add the mapping
curl -X PUT http://localhost:9200/A/_mapping/B -H 'Content-Type: application/json' -d '{"B" : {"discover" : ".*"}}'
4.check the mapping
curl -X GET http://localhost:9200/A/B/_mapping
5. make a test query to index/mapping
curl -X GET http://localhost:9200/A/B/_search -H 'Content-Type: application/json' -d '{"from": 1,"size": 10,"query": {"match_all": {}}}'