es-create-index.sh 349 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. curl -XDELETE http://localhost:9200/tfb
  3. curl -XPUT 'http://localhost:9200/tfb' -d '
  4. {
  5. "settings": {
  6. "index": {
  7. "number_of_shards": 1,
  8. "number_of_replicas": 1
  9. }
  10. },
  11. "mappings": {
  12. "world": {
  13. "properties": {
  14. "randomNumber": { "type" : "integer", "index" : "not_analyzed" }
  15. }
  16. }
  17. }
  18. }
  19. '