medcal_dealer.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. curl -XPUT http://127.0.0.1:9800/medical_dealer_v1 -d '{
  2. "settings": {
  3. "index": {
  4. "search": {
  5. "showlog": {
  6. "threshold": {
  7. "query": {
  8. "trace": "100ms"
  9. },
  10. "fetch": {
  11. "tract": "100ms"
  12. }
  13. }
  14. }
  15. },
  16. "analysis": {
  17. "analyzer": {
  18. "douhao": {
  19. "type": "pattern",
  20. "pattern": ","
  21. },
  22. "my_ngram": {
  23. "filter": [
  24. "lowercase"
  25. ],
  26. "tokenizer": "my_ngram"
  27. }
  28. },
  29. "tokenizer": {
  30. "my_ngram": {
  31. "token_chars": [
  32. "letter",
  33. "digit",
  34. "punctuation",
  35. "symbol"
  36. ],
  37. "min_gram": "2",
  38. "type": "nGram",
  39. "max_gram": "2"
  40. }
  41. }
  42. },
  43. "number_of_shards": "2",
  44. "number_of_replicas": "0"
  45. }
  46. },
  47. "mappings": {
  48. "medical_dealer": {
  49. "_id": {
  50. "path": "name_id"
  51. },
  52. "_all": {
  53. "enabled": false
  54. },
  55. "properties": {
  56. "id": {
  57. "type": "long"
  58. },
  59. "company_id": {
  60. "index": "not_analyzed",
  61. "type": "string"
  62. },
  63. "dealer_name": {
  64. "index": "not_analyzed",
  65. "type": "string",
  66. "fields": {
  67. "p_miname": {
  68. "analyzer": "my_ngram",
  69. "type": "string"
  70. }
  71. }
  72. },
  73. "area_code": {
  74. "index": "not_analyzed",
  75. "type": "string"
  76. },
  77. "city_code": {
  78. "index": "not_analyzed",
  79. "type": "string"
  80. },
  81. "district_code": {
  82. "index": "not_analyzed",
  83. "type": "string"
  84. }
  85. }
  86. }
  87. }
  88. }'