You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mapping.json 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. {
  2. "settings": {
  3. "index": {
  4. "number_of_shards": 4,
  5. "number_of_replicas": 0,
  6. "refresh_interval" : "1000ms"
  7. },
  8. "similarity": {
  9. "scripted_sim": {
  10. "type": "scripted",
  11. "script": {
  12. "source": "double idf = Math.log(1+(field.docCount-term.docFreq+0.5)/(term.docFreq + 0.5))/Math.log(1+((field.docCount-0.5)/1.5)); return query.boost * idf * Math.min(doc.freq, 1);"
  13. }
  14. }
  15. }
  16. },
  17. "mappings": {
  18. "properties": {
  19. "lat_lon": {"type": "geo_point", "store":"true"}
  20. },
  21. "date_detection": "true",
  22. "dynamic_templates": [
  23. {
  24. "int": {
  25. "match": "*_int",
  26. "mapping": {
  27. "type": "integer",
  28. "store": "true"
  29. }
  30. }
  31. },
  32. {
  33. "numeric": {
  34. "match": "*_flt",
  35. "mapping": {
  36. "type": "float",
  37. "store": true
  38. }
  39. }
  40. },
  41. {
  42. "tks": {
  43. "match": "*_tks",
  44. "mapping": {
  45. "type": "text",
  46. "similarity": "scripted_sim",
  47. "analyzer": "whitespace",
  48. "store": true
  49. }
  50. }
  51. },
  52. {
  53. "ltks":{
  54. "match": "*_ltks",
  55. "mapping": {
  56. "type": "text",
  57. "analyzer": "whitespace",
  58. "store": true
  59. }
  60. }
  61. },
  62. {
  63. "kwd": {
  64. "match_pattern": "regex",
  65. "match": "^(.*_(kwd|id|ids|uid|uids)|uid)$",
  66. "mapping": {
  67. "type": "keyword",
  68. "similarity": "boolean",
  69. "store": true
  70. }
  71. }
  72. },
  73. {
  74. "dt": {
  75. "match_pattern": "regex",
  76. "match": "^.*(_dt|_time|_at)$",
  77. "mapping": {
  78. "type": "date",
  79. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM-dd_HH:mm:ss",
  80. "store": true
  81. }
  82. }
  83. },
  84. {
  85. "nested": {
  86. "match": "*_nst",
  87. "mapping": {
  88. "type": "nested"
  89. }
  90. }
  91. },
  92. {
  93. "object": {
  94. "match": "*_obj",
  95. "mapping": {
  96. "type": "object",
  97. "dynamic": "true"
  98. }
  99. }
  100. },
  101. {
  102. "string": {
  103. "match": "*_with_weight",
  104. "mapping": {
  105. "type": "text",
  106. "index": "false",
  107. "store": true
  108. }
  109. }
  110. },
  111. {
  112. "string": {
  113. "match": "*_fea",
  114. "mapping": {
  115. "type": "rank_feature"
  116. }
  117. }
  118. },
  119. {
  120. "dense_vector": {
  121. "match": "*_vec",
  122. "mapping": {
  123. "type": "dense_vector",
  124. "index": true,
  125. "similarity": "cosine"
  126. }
  127. }
  128. },
  129. {
  130. "binary": {
  131. "match": "*_bin",
  132. "mapping": {
  133. "type": "binary"
  134. }
  135. }
  136. }
  137. ]
  138. }
  139. }