Advertisement
MedvedkovIgor

Untitled

Dec 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.39 KB | None | 0 0
  1. {
  2. "size": 0,
  3. "query": {
  4. "bool": {
  5. "filter": [
  6. {
  7. "bool": {
  8. "should": [
  9. {
  10. "has_child": {
  11. "query": {
  12. "bool": {
  13. "filter": [
  14. {
  15. "bool": {
  16. "should": [
  17. {
  18. "match_phrase": {
  19. "GoogleSearch.keyword": {
  20. "query": "youtube",
  21. "slop": 0,
  22. "boost": 1
  23. }
  24. }
  25. }
  26. ],
  27. "adjust_pure_negative": true,
  28. "boost": 1
  29. }
  30. }
  31. ],
  32. "adjust_pure_negative": true,
  33. "boost": 1
  34. }
  35. },
  36. "type": "action",
  37. "score_mode": "none",
  38. "min_children": 0,
  39. "max_children": 2147483647,
  40. "ignore_unmapped": false,
  41. "boost": 1
  42. }
  43. }
  44. ],
  45. "adjust_pure_negative": true,
  46. "boost": 1
  47. }
  48. }
  49. ],
  50. "adjust_pure_negative": true,
  51. "boost": 1
  52. }
  53. },
  54. "aggs": {
  55. "children": {
  56. "children": {
  57. "type": "action"
  58. },
  59. "aggs": {
  60. "matching_raws": {
  61. "filter": {
  62. "bool": {
  63. "filter": [
  64. {
  65. "bool": {
  66. "filter": [
  67. {
  68. "bool": {
  69. "should": [
  70. {
  71. "match_phrase": {
  72. "GoogleSearch.keyword": {
  73. "query": "youtube",
  74. "slop": 0,
  75. "boost": 1
  76. }
  77. }
  78. }
  79. ],
  80. "adjust_pure_negative": true,
  81. "boost": 1
  82. }
  83. }
  84. ],
  85. "adjust_pure_negative": true,
  86. "boost": 1
  87. }
  88. }
  89. ]
  90. }
  91. },
  92. "aggs": {
  93. "keywords": {
  94. "terms": {
  95. "field": "GoogleSearch.keyword.raw"
  96. },
  97. "aggs": {
  98. "tenActionsFiltering": {
  99. "bucket_selector": {
  100. "buckets_path": {
  101. "actionsCount": "_count"
  102. },
  103. "script": "params.actionsCount>10"
  104. }
  105. },
  106. "uuids_count": {
  107. "cardinality": {
  108. "field": "uuid",
  109. "precision_threshold": 3000
  110. }
  111. },
  112. "twoUUIDsFiltering": {
  113. "bucket_selector": {
  114. "buckets_path": {
  115. "uuidsCount": "uuids_count"
  116. },
  117. "script": "params.uuidsCount>2"
  118. }
  119. },
  120. "sort_by_doc_count": {
  121. "bucket_sort": {
  122. "sort": [
  123. {
  124. "_count": {
  125. "order": "desc"
  126. }
  127. }
  128. ]
  129. }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }
  136. }
  137. }
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement