選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

mapping.json 4.2KB

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