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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. {
  2. "settings": {
  3. "index": {
  4. "number_of_shards": 2,
  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": {
  20. "type": "geo_point",
  21. "store": "true"
  22. }
  23. },
  24. "date_detection": "true",
  25. "dynamic_templates": [
  26. {
  27. "int": {
  28. "match": "*_int",
  29. "mapping": {
  30. "type": "integer",
  31. "store": "true"
  32. }
  33. }
  34. },
  35. {
  36. "ulong": {
  37. "match": "*_ulong",
  38. "mapping": {
  39. "type": "unsigned_long",
  40. "store": "true"
  41. }
  42. }
  43. },
  44. {
  45. "long": {
  46. "match": "*_long",
  47. "mapping": {
  48. "type": "long",
  49. "store": "true"
  50. }
  51. }
  52. },
  53. {
  54. "short": {
  55. "match": "*_short",
  56. "mapping": {
  57. "type": "short",
  58. "store": "true"
  59. }
  60. }
  61. },
  62. {
  63. "numeric": {
  64. "match": "*_flt",
  65. "mapping": {
  66. "type": "float",
  67. "store": true
  68. }
  69. }
  70. },
  71. {
  72. "tks": {
  73. "match": "*_tks",
  74. "mapping": {
  75. "type": "text",
  76. "similarity": "scripted_sim",
  77. "analyzer": "whitespace",
  78. "store": true
  79. }
  80. }
  81. },
  82. {
  83. "ltks": {
  84. "match": "*_ltks",
  85. "mapping": {
  86. "type": "text",
  87. "analyzer": "whitespace",
  88. "store": true
  89. }
  90. }
  91. },
  92. {
  93. "kwd": {
  94. "match_pattern": "regex",
  95. "match": "^(.*_(kwd|id|ids|uid|uids)|uid)$",
  96. "mapping": {
  97. "type": "keyword",
  98. "similarity": "boolean",
  99. "store": true
  100. }
  101. }
  102. },
  103. {
  104. "dt": {
  105. "match_pattern": "regex",
  106. "match": "^.*(_dt|_time|_at)$",
  107. "mapping": {
  108. "type": "date",
  109. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||yyyy-MM-dd_HH:mm:ss",
  110. "store": true
  111. }
  112. }
  113. },
  114. {
  115. "nested": {
  116. "match": "*_nst",
  117. "mapping": {
  118. "type": "nested"
  119. }
  120. }
  121. },
  122. {
  123. "object": {
  124. "match": "*_obj",
  125. "mapping": {
  126. "type": "object",
  127. "dynamic": "true"
  128. }
  129. }
  130. },
  131. {
  132. "string": {
  133. "match_pattern": "regex",
  134. "match": "^.*_(with_weight|list)$",
  135. "mapping": {
  136. "type": "text",
  137. "index": "false",
  138. "store": true
  139. }
  140. }
  141. },
  142. {
  143. "rank_feature": {
  144. "match": "*_fea",
  145. "mapping": {
  146. "type": "rank_feature"
  147. }
  148. }
  149. },
  150. {
  151. "rank_features": {
  152. "match": "*_feas",
  153. "mapping": {
  154. "type": "rank_features"
  155. }
  156. }
  157. },
  158. {
  159. "dense_vector": {
  160. "match": "*_512_vec",
  161. "mapping": {
  162. "type": "dense_vector",
  163. "index": true,
  164. "similarity": "cosine",
  165. "dims": 512
  166. }
  167. }
  168. },
  169. {
  170. "dense_vector": {
  171. "match": "*_768_vec",
  172. "mapping": {
  173. "type": "dense_vector",
  174. "index": true,
  175. "similarity": "cosine",
  176. "dims": 768
  177. }
  178. }
  179. },
  180. {
  181. "dense_vector": {
  182. "match": "*_1024_vec",
  183. "mapping": {
  184. "type": "dense_vector",
  185. "index": true,
  186. "similarity": "cosine",
  187. "dims": 1024
  188. }
  189. }
  190. },
  191. {
  192. "dense_vector": {
  193. "match": "*_1536_vec",
  194. "mapping": {
  195. "type": "dense_vector",
  196. "index": true,
  197. "similarity": "cosine",
  198. "dims": 1536
  199. }
  200. }
  201. },
  202. {
  203. "binary": {
  204. "match": "*_bin",
  205. "mapping": {
  206. "type": "binary"
  207. }
  208. }
  209. }
  210. ]
  211. }
  212. }