biddingall.txt 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. curl -XPUT http://127.0.0.1:9800/bidding_all -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_title": {
  19. "filter": [
  20. "lowercase"
  21. ],
  22. "tokenizer": "my_ngram_title"
  23. },
  24. "douhao": {
  25. "type": "pattern",
  26. "pattern": ","
  27. },
  28. "my_ngram": {
  29. "filter": [
  30. "lowercase"
  31. ],
  32. "tokenizer": "my_ngram"
  33. }
  34. },
  35. "tokenizer": {
  36. "my_ngram_title": {
  37. "token_chars": [
  38. "letter",
  39. "digit",
  40. "punctuation",
  41. "symbol"
  42. ],
  43. "min_gram": "1",
  44. "type": "nGram",
  45. "max_gram": "1"
  46. },
  47. "my_ngram": {
  48. "token_chars": [
  49. "letter",
  50. "digit",
  51. "punctuation",
  52. "symbol"
  53. ],
  54. "min_gram": "2",
  55. "type": "nGram",
  56. "max_gram": "2"
  57. }
  58. }
  59. },
  60. "number_of_shards": "1",
  61. "number_of_replicas": "0"
  62. }
  63. },
  64. "mappings": {
  65. "bidding": {
  66. "transform": {
  67. "lang": "groovy",
  68. "script": "ctx._source[\"id\"] = ctx._source[\"_id\"]"
  69. },
  70. "_id": {
  71. "path": "_id"
  72. },
  73. "_all": {
  74. "enabled": false
  75. },
  76. "properties": {
  77. "projectname": {
  78. "index": "not_analyzed",
  79. "type": "string",
  80. "fields": {
  81. "pname": {
  82. "type": "string"
  83. }
  84. }
  85. },
  86. "id": {
  87. "index": "not_analyzed",
  88. "type": "string"
  89. },
  90. "title": {
  91. "analyzer": "my_ngram_title",
  92. "type": "string",
  93. "fields": {
  94. "mtitle": {
  95. "index": "not_analyzed",
  96. "type": "string"
  97. }
  98. }
  99. },
  100. "site": {
  101. "index": "not_analyzed",
  102. "type": "string"
  103. },
  104. "href": {
  105. "index": "not_analyzed",
  106. "type": "string"
  107. },
  108. "publishtime": {
  109. "type": "long"
  110. },
  111. "spidercode": {
  112. "index": "not_analyzed",
  113. "type": "string"
  114. },
  115. "extracttype": {
  116. "type": "long"
  117. }
  118. }
  119. }
  120. }
  121. }'