biddingmapping_test.json 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. curl -XPUT http://192.168.3.11:9800/bidding_v5 -d '{
  2. "settings": {
  3. "index": {
  4. "analysis": {
  5. "analyzer": {
  6. "my_ngram_title": {
  7. "filter": [
  8. "lowercase"
  9. ],
  10. "tokenizer": "my_ngram_title"
  11. },
  12. "douhao": {
  13. "type": "pattern",
  14. "pattern": ","
  15. },
  16. "my_ngram": {
  17. "filter": [
  18. "lowercase"
  19. ],
  20. "tokenizer": "my_ngram"
  21. }
  22. },
  23. "tokenizer": {
  24. "my_ngram_title": {
  25. "token_chars": [
  26. "letter",
  27. "digit",
  28. "punctuation",
  29. "symbol"
  30. ],
  31. "min_gram": "1",
  32. "type": "nGram",
  33. "max_gram": "1"
  34. },
  35. "my_ngram": {
  36. "token_chars": [
  37. "letter",
  38. "digit",
  39. "punctuation",
  40. "symbol"
  41. ],
  42. "min_gram": "2",
  43. "type": "nGram",
  44. "max_gram": "2"
  45. }
  46. }
  47. },
  48. "number_of_shards": "5",
  49. "number_of_replicas": "0"
  50. }
  51. },
  52. "mappings": {
  53. "bidding": {
  54. "transform": {
  55. "lang": "groovy",
  56. "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
  57. },
  58. "_id": {
  59. "path": "_id"
  60. },
  61. "_all": {
  62. "enabled": false
  63. },
  64. "properties": {
  65. "buyerzipcode": {
  66. "index": "not_analyzed",
  67. "type": "string"
  68. },
  69. "winnertel": {
  70. "index": "not_analyzed",
  71. "type": "string"
  72. },
  73. "winnerperson": {
  74. "index": "not_analyzed",
  75. "type": "string"
  76. },
  77. "contractcode": {
  78. "index": "not_analyzed",
  79. "type": "string"
  80. },
  81. "winneraddr": {
  82. "index": "not_analyzed",
  83. "type": "string"
  84. },
  85. "agencyaddr": {
  86. "index": "not_analyzed",
  87. "type": "string"
  88. },
  89. "buyeraddr": {
  90. "index": "not_analyzed",
  91. "type": "string"
  92. },
  93. "signaturedate": {
  94. "type": "long"
  95. },
  96. "projectperiod": {
  97. "index": "not_analyzed",
  98. "type": "string"
  99. },
  100. "projectaddr": {
  101. "index": "not_analyzed",
  102. "type": "string"
  103. },
  104. "agencytel": {
  105. "index": "not_analyzed",
  106. "type": "string"
  107. },
  108. "agencyperson": {
  109. "index": "not_analyzed",
  110. "type": "string"
  111. },
  112. "buyerperson": {
  113. "index": "not_analyzed",
  114. "type": "string"
  115. },
  116. "agency": {
  117. "index": "not_analyzed",
  118. "type": "string"
  119. },
  120. "projectscope": {
  121. "index": "not_analyzed",
  122. "type": "string"
  123. },
  124. "projectcode": {
  125. "index": "not_analyzed",
  126. "type": "string"
  127. },
  128. "bidopentime": {
  129. "type": "long"
  130. },
  131. "supervisorrate": {
  132. "type": "double"
  133. },
  134. "buyertel": {
  135. "index": "not_analyzed",
  136. "type": "string"
  137. },
  138. "bidamount": {
  139. "type": "double"
  140. },
  141. "winner": {
  142. "index": "not_analyzed",
  143. "type": "string"
  144. },
  145. "buyer": {
  146. "index": "not_analyzed",
  147. "type": "string"
  148. },
  149. "budget": {
  150. "type": "double"
  151. },
  152. "projectname": {
  153. "index": "not_analyzed",
  154. "type": "string"
  155. },
  156. "bidstatus": {
  157. "index": "not_analyzed",
  158. "type": "string"
  159. },
  160. "buyerclass": {
  161. "index": "not_analyzed",
  162. "type": "string"
  163. },
  164. "topscopeclass": {
  165. "index": "not_analyzed",
  166. "type": "string"
  167. },
  168. "s_subscopeclass": {
  169. "analyzer": "douhao",
  170. "type": "string"
  171. },
  172. "area": {
  173. "index": "not_analyzed",
  174. "type": "string"
  175. },
  176. "city": {
  177. "index": "not_analyzed",
  178. "type": "string"
  179. },
  180. "district": {
  181. "index": "not_analyzed",
  182. "type": "string"
  183. },
  184. "s_winner": {
  185. "analyzer": "douhao",
  186. "type": "string"
  187. },
  188. "id": {
  189. "index": "not_analyzed",
  190. "type": "string"
  191. },
  192. "title": {
  193. "analyzer": "my_ngram_title",
  194. "type": "string"
  195. },
  196. "detail": {
  197. "analyzer": "my_ngram",
  198. "type": "string"
  199. },
  200. "site": {
  201. "index": "not_analyzed",
  202. "type": "string"
  203. },
  204. "comeintime": {
  205. "type": "long"
  206. },
  207. "href": {
  208. "index": "not_analyzed",
  209. "type": "string"
  210. },
  211. "infoformat": {
  212. "type": "long"
  213. },
  214. "publishtime": {
  215. "type": "long"
  216. },
  217. "s_sha": {
  218. "index": "not_analyzed",
  219. "type": "string"
  220. },
  221. "spidercode": {
  222. "index": "not_analyzed",
  223. "type": "string"
  224. },
  225. "toptype": {
  226. "index": "not_analyzed",
  227. "type": "string"
  228. },
  229. "subtype": {
  230. "index": "not_analyzed",
  231. "type": "string"
  232. },
  233. "projectinfo": {
  234. "properties": {
  235. "approvecode": {
  236. "type": "string"
  237. },
  238. "approvecontent": {
  239. "type": "string"
  240. },
  241. "approvestatus": {
  242. "type": "string"
  243. },
  244. "approvetime": {
  245. "type": "string"
  246. },
  247. "approvedept": {
  248. "type": "string"
  249. },
  250. "approvenumber": {
  251. "type": "string"
  252. },
  253. "projecttype": {
  254. "type": "string"
  255. },
  256. "approvecity": {
  257. "type": "string"
  258. }
  259. }
  260. },
  261. "attachments": {
  262. "analyzer": "my_ngram",
  263. "type": "string"
  264. },
  265. "filetext": {
  266. "type":"string",
  267. "analyzer": "my_ngram"
  268. },
  269. "purchasing": {
  270. "type":"string",
  271. "analyzer": "douhao"
  272. },
  273. "purchasinglist": {
  274. "properties":{
  275. "itemname":{
  276. "type":"string"
  277. },
  278. "model":{
  279. "type":"string"
  280. },
  281. "unitname":{
  282. "type":"string"
  283. },
  284. "number":{
  285. "type":"double"
  286. }
  287. }
  288. },
  289. "tagname":{
  290. "analyzer": "douhao",
  291. "type":"string"
  292. },
  293. "s_topscopeclass":{
  294. "analyzer": "douhao",
  295. "type":"string"
  296. },
  297. "channel": {
  298. "index": "not_analyzed",
  299. "type": "string"
  300. },
  301. "winnerorder": {
  302. "properties":{
  303. "sort":{
  304. "type":"integer"
  305. },
  306. "sortstr":{
  307. "type":"string"
  308. },
  309. "entname":{
  310. "type":"string"
  311. }
  312. }
  313. }
  314. }
  315. }
  316. }
  317. }'