body_health_data_es.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. es7没有type的概念
  2. 创建索引
  3. PUT http://172.26.0.112:9200/body_health_data
  4. 查询索引
  5. get http://172.26.0.112:9200/body_health_data
  6. 给索引加mapping
  7. PUT http://172.26.0.112:9200/body_health_data
  8. {
  9. "mappings": {
  10. "properties": {
  11. "device_name": {
  12. "type": "keyword"
  13. },
  14. "del": {
  15. "type": "keyword"
  16. },
  17. "rid": {
  18. "type": "keyword"
  19. },
  20. "status": {
  21. "type": "keyword"
  22. },
  23. "measure_data": {
  24. "properties": {
  25. "type": {
  26. "type": "keyword"
  27. },
  28. "measure_time": {
  29. "type": "keyword"
  30. },
  31. "sign_name": {
  32. "type": "keyword"
  33. },
  34. "sign_value": {
  35. "type": "keyword"
  36. },
  37. "sign_unit": {
  38. "type": "keyword"
  39. },
  40. "explain": {
  41. "type": "keyword"
  42. },
  43. "filepath": {
  44. "type": "keyword"
  45. },
  46. "reference": {
  47. "type": "keyword"
  48. }
  49. }
  50. },
  51. "position_data": {
  52. "properties": {
  53. "location": {
  54. "type": "geo_point"
  55. },
  56. "altitude": {
  57. "type": "keyword"
  58. },
  59. "position": {
  60. "type": "keyword"
  61. }
  62. }
  63. },
  64. "device_model": {
  65. "type": "keyword"
  66. },
  67. "ext_code": {
  68. "type": "keyword"
  69. },
  70. "idcard": {
  71. "type": "keyword"
  72. },
  73. "idcard_type": {
  74. "type": "keyword"
  75. },
  76. "sn": {
  77. "type": "keyword"
  78. },
  79. "usercode": {
  80. "type": "keyword"
  81. },
  82. "data_source": {
  83. "type": "keyword"
  84. },
  85. "username": {
  86. "type": "keyword"
  87. }
  88. }
  89. }
  90. }