entmapping.txt 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1.  curl -XPUT http://127.0.0.1:9800/qyxy_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. "my_ngram": {
  19. "filter": [
  20. "lowercase"
  21. ],
  22. "tokenizer": "my_ngram"
  23. }
  24. },
  25. "tokenizer": {
  26. "my_ngram": {
  27. "type": "nGram",
  28. "min_gram": "2",
  29. "max_gram": "2"
  30. }
  31. }
  32. },
  33. "number_of_shards": "8",
  34. "number_of_replicas": "0"
  35. }
  36. },
  37. "mappings": {
  38. "qyxy": {
  39. "transform": {
  40. "lang": "groovy",
  41. "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
  42. },
  43. "_all": {
  44. "enabled": false
  45. },
  46. "_id": {
  47. "path": "_id"
  48. },
  49. "properties": {
  50. "name": {
  51. "analyzer": "my_ngram",
  52. "type": "string",
  53. "fields": {
  54. "ent_name": {
  55. "index": "not_analyzed",
  56. "type": "string"
  57. },
  58. "ent_ikname": {
  59. "analyzer": "ik_smart",
  60. "type": "string"
  61. }
  62. }
  63. },
  64. "company_name": {
  65. "index": "not_analyzed",
  66. "type": "string"
  67. },
  68. "history_name": {
  69. "analyzer": "my_ngram",
  70. "type": "string",
  71. "fields": {
  72. "hname": {
  73. "index": "not_analyzed",
  74. "type": "string"
  75. }
  76. }
  77. },
  78. "company_code": {
  79. "index": "not_analyzed",
  80. "type": "string"
  81. },
  82. "credit_no": {
  83. "index": "not_analyzed",
  84. "type": "string"
  85. },
  86. "org_code": {
  87. "index": "not_analyzed",
  88. "type": "string"
  89. },
  90. "tax_code": {
  91. "index": "not_analyzed",
  92. "type": "string"
  93. },
  94. "area_code": {
  95. "index": "not_analyzed",
  96. "type": "string"
  97. },
  98. "company_area": {
  99. "index": "not_analyzed",
  100. "type": "string"
  101. },
  102. "company_city": {
  103. "index": "not_analyzed",
  104. "type": "string"
  105. },
  106. "company_district": {
  107. "index": "not_analyzed",
  108. "type": "string"
  109. },
  110. "company_type_old": {
  111. "index": "not_analyzed",
  112. "type": "string"
  113. },
  114. "company_type": {
  115. "type": "string"
  116. },
  117. "company_type_int": {
  118. "type": "integer"
  119. },
  120. "legal_person": {
  121. "index": "not_analyzed",
  122. "type": "string"
  123. },
  124. "legal_person_certno": {
  125. "index": "not_analyzed",
  126. "type": "string"
  127. },
  128. "establish_date": {
  129. "index": "not_analyzed",
  130. "type": "string"
  131. },
  132. "lastupdatetime": {
  133. "index": "not_analyzed",
  134. "type": "string"
  135. },
  136. "capital": {
  137. "type": "double"
  138. },
  139. "currency": {
  140. "index": "not_analyzed",
  141. "type": "string"
  142. },
  143. "operation_startdate": {
  144. "index": "not_analyzed",
  145. "type": "string"
  146. },
  147. "operation_enddate": {
  148. "index": "not_analyzed",
  149. "type": "string"
  150. },
  151. "authority": {
  152. "index": "not_analyzed",
  153. "type": "string"
  154. },
  155. "issue_date": {
  156. "index": "not_analyzed",
  157. "type": "string"
  158. },
  159. "company_status": {
  160. "index": "not_analyzed",
  161. "type": "string"
  162. },
  163. "company_address": {
  164. "index": "not_analyzed",
  165. "type": "string"
  166. },
  167. "business_scope": {
  168. "type": "string"
  169. },
  170. "cancel_date": {
  171. "index": "not_analyzed",
  172. "type": "string"
  173. },
  174. "revoke_date": {
  175. "index": "not_analyzed",
  176. "type": "string"
  177. },
  178. "company_phone": {
  179. "index": "not_analyzed",
  180. "type": "string"
  181. },
  182. "company_email": {
  183. "index": "not_analyzed",
  184. "type": "string"
  185. },
  186. "stock_name": {
  187. "index": "not_analyzed",
  188. "type": "string"
  189. },
  190. "partners": {
  191. "properties": {
  192. "identify_no": {
  193. "index": "not_analyzed",
  194. "type": "string"
  195. },
  196. "stock_type": {
  197. "index": "not_analyzed",
  198. "type": "string"
  199. },
  200. "stock_name": {
  201. "index": "not_analyzed",
  202. "type": "string"
  203. },
  204. "identify_type": {
  205. "index": "not_analyzed",
  206. "type": "string"
  207. },
  208. "stock_capital": {
  209. "type": "double"
  210. },
  211. "stock_realcapital": {
  212. "type": "double"
  213. }
  214. }
  215. },
  216. "updatetime": {
  217. "type": "long"
  218. }
  219. }
  220. }
  221. }
  222. }'