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.

os_mapping.json 4.4KB

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