Guest User

Untitled

a guest
Mar 24th, 2018
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.01 KB | None | 0 0
  1. {
  2. "description": "full_text search for 'foo'",
  3. "path": "hf5_l2wiki_content\/page\/_search",
  4. "params": {
  5. "timeout": "20s",
  6. "search_type": "dfs_query_then_fetch"
  7. },
  8. "query": {
  9. "_source": [
  10. "namespace",
  11. "title",
  12. "namespace_text",
  13. "wiki",
  14. "redirect.*",
  15. "timestamp",
  16. "text_bytes"
  17. ],
  18. "stored_fields": [
  19. "text.word_count"
  20. ],
  21. "query": {
  22. "bool": {
  23. "minimum_should_match": 1,
  24. "should": [
  25. {
  26. "query_string": {
  27. "query": "foo",
  28. "fields": [
  29. "all.plain^1",
  30. "all^0,5"
  31. ],
  32. "auto_generate_phrase_queries": true,
  33. "phrase_slop": 0,
  34. "default_operator": "AND",
  35. "allow_leading_wildcard": true,
  36. "fuzzy_prefix_length": 2,
  37. "rewrite": "top_terms_boost_1024"
  38. }
  39. },
  40. {
  41. "multi_match": {
  42. "fields": [
  43. "all_near_match^2"
  44. ],
  45. "query": "foo"
  46. }
  47. }
  48. ],
  49. "filter": [
  50. {
  51. "terms": {
  52. "namespace": [
  53. 0,
  54. 102,
  55. 108
  56. ]
  57. }
  58. }
  59. ]
  60. }
  61. },
  62. "highlight": {
  63. "pre_tags": [
  64. "<span class=\"searchmatch\">"
  65. ],
  66. "post_tags": [
  67. "<\/span>"
  68. ],
  69. "fields": {
  70. "title": {
  71. "number_of_fragments": 0,
  72. "type": "fvh",
  73. "order": "score",
  74. "matched_fields": [
  75. "title",
  76. "title.plain"
  77. ]
  78. },
  79. "redirect.title": {
  80. "number_of_fragments": 1,
  81. "fragment_size": 10000,
  82. "type": "fvh",
  83. "order": "score",
  84. "matched_fields": [
  85. "redirect.title",
  86. "redirect.title.plain"
  87. ]
  88. },
  89. "category": {
  90. "number_of_fragments": 1,
  91. "fragment_size": 10000,
  92. "type": "fvh",
  93. "order": "score",
  94. "matched_fields": [
  95. "category",
  96. "category.plain"
  97. ]
  98. },
  99. "heading": {
  100. "number_of_fragments": 1,
  101. "fragment_size": 10000,
  102. "type": "fvh",
  103. "order": "score",
  104. "matched_fields": [
  105. "heading",
  106. "heading.plain"
  107. ]
  108. },
  109. "text": {
  110. "number_of_fragments": 1,
  111. "fragment_size": 150,
  112. "type": "fvh",
  113. "order": "score",
  114. "no_match_size": 150,
  115. "matched_fields": [
  116. "text",
  117. "text.plain"
  118. ]
  119. },
  120. "auxiliary_text": {
  121. "number_of_fragments": 1,
  122. "fragment_size": 150,
  123. "type": "fvh",
  124. "order": "score",
  125. "matched_fields": [
  126. "auxiliary_text",
  127. "auxiliary_text.plain"
  128. ]
  129. }
  130. },
  131. "highlight_query": {
  132. "query_string": {
  133. "query": "foo",
  134. "fields": [
  135. "title.plain^20",
  136. "redirect.title.plain^15",
  137. "category.plain^8",
  138. "heading.plain^5",
  139. "opening_text.plain^3",
  140. "text.plain^1",
  141. "auxiliary_text.plain^0,5",
  142. "title^10",
  143. "redirect.title^7,5",
  144. "category^4",
  145. "heading^2,5",
  146. "opening_text^1,5",
  147. "text^0,5",
  148. "auxiliary_text^0,25"
  149. ],
  150. "auto_generate_phrase_queries": true,
  151. "phrase_slop": 1,
  152. "default_operator": "AND",
  153. "allow_leading_wildcard": true,
  154. "fuzzy_prefix_length": 2,
  155. "rewrite": "top_terms_boost_1024"
  156. }
  157. }
  158. },
  159. "suggest": {
  160. "text": "foo",
  161. "suggest": {
  162. "phrase": {
  163. "field": "suggest",
  164. "size": 1,
  165. "max_errors": 2,
  166. "confidence": 2,
  167. "real_word_error_likelihood": 0.94999999999999996,
  168. "direct_generator": [
  169. {
  170. "field": "suggest",
  171. "suggest_mode": "always",
  172. "max_term_freq": 0.5,
  173. "min_doc_freq": 0,
  174. "prefix_length": 2
  175. }
  176. ],
  177. "highlight": {
  178. "pre_tag": "<em>",
  179. "post_tag": "<\/em>"
  180. },
  181. "smoothing": {
  182. "stupid_backoff": {
  183. "discount": 0.40000000000000002
  184. }
  185. }
  186. }
  187. }
  188. },
  189. "stats": [
  190. "suggest",
  191. "full_text",
  192. "full_text_querystring"
  193. ],
  194. "size": 20,
  195. "rescore": [
  196. {
  197. "window_size": 8192,
  198. "query": {
  199. "query_weight": 1,
  200. "rescore_query_weight": 1,
  201. "score_mode": "multiply",
  202. "rescore_query": {
  203. "function_score": {
  204. "functions": [
  205. {
  206. "field_value_factor": {
  207. "field": "incoming_links",
  208. "modifier": "log2p",
  209. "missing": 0
  210. }
  211. },
  212. {
  213. "weight": "0,2",
  214. "filter": {
  215. "terms": {
  216. "namespace": [
  217. 102,
  218. 108
  219. ]
  220. }
  221. }
  222. }
  223. ]
  224. }
  225. }
  226. }
  227. }
  228. ]
  229. },
  230. "options": {
  231. "timeout": "20s",
  232. "search_type": "dfs_query_then_fetch"
  233. }
  234. }
Add Comment
Please, Sign In to add comment