project-forecast.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. curl -XPUT http://127.0.0.1:19800/forecast_v2 -d '{
  2. "settings": {
  3. "index": {
  4. "analysis": {
  5. "analyzer": {
  6. "douhao": {
  7. "type": "pattern",
  8. "pattern": ","
  9. },
  10. "my_ngram_title": {
  11. "filter": [
  12. "lowercase"
  13. ],
  14. "tokenizer": "my_ngram_title"
  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. ],
  40. "min_gram": "2",
  41. "type": "nGram",
  42. "max_gram": "2"
  43. }
  44. }
  45. },
  46. "number_of_shards": "20",
  47. "number_of_replicas": "0"
  48. }
  49. },
  50. "mappings": {
  51. "forecast": {
  52. "transform": {
  53. "lang": "groovy",
  54. "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
  55. },
  56. "_id": {
  57. "path": "_id"
  58. },
  59. "_all": {
  60. "enabled": false
  61. },
  62. "properties": {
  63. "area": {
  64. "index": "not_analyzed",
  65. "type": "string"
  66. },
  67. "city": {
  68. "index": "not_analyzed",
  69. "type": "string"
  70. },
  71. "nature": {
  72. "index": "not_analyzed",
  73. "type": "string"
  74. },
  75. "buyer": {
  76. "index": "not_analyzed",
  77. "type": "string"
  78. },
  79. "buyerclass": {
  80. "index": "not_analyzed",
  81. "type": "string"
  82. },
  83. "title": {
  84. "analyzer": "my_ngram_title",
  85. "type": "string"
  86. },
  87. "projectname": {
  88. "index": "not_analyzed",
  89. "type": "string",
  90. "fields": {
  91. "pname": {
  92. "type": "string"
  93. }
  94. }
  95. },
  96. "projectcode": {
  97. "index": "not_analyzed",
  98. "type": "string"
  99. },
  100. "spidercode": {
  101. "index": "not_analyzed",
  102. "type": "string"
  103. },
  104. "stage": {
  105. "index": "not_analyzed",
  106. "type": "string"
  107. },
  108. "main_project": {
  109. "index": "not_analyzed",
  110. "type": "string"
  111. },
  112. "top_category": {
  113. "index": "not_analyzed",
  114. "type": "string"
  115. },
  116. "sub_category": {
  117. "index": "not_analyzed",
  118. "type": "string"
  119. },
  120. "approvestatus": {
  121. "index": "not_analyzed",
  122. "type": "string"
  123. },
  124. "href": {
  125. "index": "not_analyzed",
  126. "type": "string"
  127. },
  128. "jyhref": {
  129. "index": "not_analyzed",
  130. "type": "string"
  131. },
  132. "publishtime": {
  133. "type": "long"
  134. },
  135. "yucetime": {
  136. "type": "long"
  137. },
  138. "yucestarttime": {
  139. "type": "long"
  140. },
  141. "yuceendtime": {
  142. "type": "long"
  143. },
  144. "results": {
  145. "properties": {
  146. "purchasing": {
  147. "analyzer": "douhao",
  148. "type": "string",
  149. "fields": {
  150. "mypurchasing": {
  151. "analyzer": "my_ngram_title",
  152. "type": "string"
  153. }
  154. }
  155. },
  156. "p_projects": {
  157. "properties": {
  158. "p_purchasing": {
  159. "index": "not_analyzed",
  160. "type": "string"
  161. },
  162. "p_id": {
  163. "index": "not_analyzed",
  164. "type": "string"
  165. },
  166. "p_orther": {
  167. "index": "not_analyzed",
  168. "type": "string"
  169. },
  170. "p_phone": {
  171. "index": "not_analyzed",
  172. "type": "string"
  173. },
  174. "p_person": {
  175. "index": "not_analyzed",
  176. "type": "string"
  177. }
  178. }
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. }'