buyer.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. curl -XPUT http://127.0.0.1:19800/buyer_v2 -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. "my_ngram": {
  19. "tokenizer": "my_ngram"
  20. }
  21. },
  22. "tokenizer": {
  23. "my_ngram": {
  24. "min_gram": "2",
  25. "type": "nGram",
  26. "max_gram": "2"
  27. }
  28. }
  29. },
  30. "number_of_shards": "20",
  31. "number_of_replicas": "0"
  32. }
  33. },
  34. "mappings": {
  35. "buyer": {
  36. "transform": {
  37. "lang": "groovy",
  38. "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
  39. },
  40. "_id": {
  41. "path": "_id"
  42. },
  43. "_all": {
  44. "enabled": false
  45. },
  46. "properties": {
  47. "name": {
  48. "analyzer": "my_ngram",
  49. "type": "string"
  50. },
  51. "buyer_name": {
  52. "index": "not_analyzed",
  53. "type": "string"
  54. },
  55. "institute_type": {
  56. "index": "not_analyzed",
  57. "type": "string"
  58. },
  59. "buyerclass": {
  60. "index": "not_analyzed",
  61. "type": "string"
  62. },
  63. "fixedphone": {
  64. "index": "not_analyzed",
  65. "type": "string"
  66. },
  67. "mobilephone": {
  68. "index": "not_analyzed",
  69. "type": "string"
  70. },
  71. "latestfixedphone": {
  72. "index": "not_analyzed",
  73. "type": "string"
  74. },
  75. "latestmobilephone": {
  76. "index": "not_analyzed",
  77. "type": "string"
  78. },
  79. "province": {
  80. "index": "not_analyzed",
  81. "type": "string"
  82. },
  83. "city": {
  84. "index": "not_analyzed",
  85. "type": "string"
  86. }
  87. }
  88. }
  89. }
  90. }'