Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

mapping.json 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. "string": {
  144. "match": "*_fea",
  145. "mapping": {
  146. "type": "rank_feature"
  147. }
  148. }
  149. },
  150. {
  151. "dense_vector": {
  152. "match": "*_512_vec",
  153. "mapping": {
  154. "type": "dense_vector",
  155. "index": true,
  156. "similarity": "cosine",
  157. "dims": 512
  158. }
  159. }
  160. },
  161. {
  162. "dense_vector": {
  163. "match": "*_768_vec",
  164. "mapping": {
  165. "type": "dense_vector",
  166. "index": true,
  167. "similarity": "cosine",
  168. "dims": 768
  169. }
  170. }
  171. },
  172. {
  173. "dense_vector": {
  174. "match": "*_1024_vec",
  175. "mapping": {
  176. "type": "dense_vector",
  177. "index": true,
  178. "similarity": "cosine",
  179. "dims": 1024
  180. }
  181. }
  182. },
  183. {
  184. "dense_vector": {
  185. "match": "*_1536_vec",
  186. "mapping": {
  187. "type": "dense_vector",
  188. "index": true,
  189. "similarity": "cosine",
  190. "dims": 1536
  191. }
  192. }
  193. },
  194. {
  195. "binary": {
  196. "match": "*_bin",
  197. "mapping": {
  198. "type": "binary"
  199. }
  200. }
  201. }
  202. ]
  203. }
  204. }