Advertisement
MedvedkovIgor

Untitled

Nov 16th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.70 KB | None | 0 0
  1. {
  2. "size": 0,
  3. "query": {
  4. "bool": {
  5. "filter": {
  6. "bool": {
  7. "should": [
  8. {
  9. "bool": {
  10. "filter": [
  11. {
  12. "term": {
  13. "uuid": {
  14. "value": "009c423e4ee9385407a04ed3066e66fa",
  15. "boost": 1
  16. }
  17. }
  18. },
  19. {
  20. "has_child": {
  21. "query": {
  22. "bool": {
  23. "filter": [
  24. {
  25. "bool": {
  26. "should": [
  27. {
  28. "match_phrase": {
  29. "GoogleSearch.keyword": {
  30. "query": "youtube",
  31. "slop": 0,
  32. "boost": 1
  33. }
  34. }
  35. }
  36. ],
  37. "adjust_pure_negative": true,
  38. "boost": 1
  39. }
  40. },
  41. {
  42. "range": {
  43. "timestamp": {
  44. "from": 1509554616147,
  45. "to": null,
  46. "include_lower": true,
  47. "include_upper": true,
  48. "boost": 1
  49. }
  50. }
  51. }
  52. ],
  53. "adjust_pure_negative": true,
  54. "boost": 1
  55. }
  56. },
  57. "type": "action",
  58. "score_mode": "none",
  59. "min_children": 0,
  60. "max_children": 2147483647,
  61. "ignore_unmapped": false,
  62. "boost": 1
  63. }
  64. }
  65. ]
  66. }
  67. },
  68. ... повторить для каждого юида
  69. ]
  70. }
  71. },
  72. "adjust_pure_negative": true,
  73. "boost": 1
  74. }
  75. },
  76. "aggregations": {
  77. "ids": {
  78. "terms": {
  79. "field": "uuid",
  80. "size": 1,
  81. "min_doc_count": 1,
  82. "shard_min_doc_count": 0,
  83. "show_term_doc_count_error": false,
  84. "order": [
  85. {
  86. "_count": "desc"
  87. },
  88. {
  89. "_key": "asc"
  90. }
  91. ]
  92. }
  93. },
  94. "Gender": {
  95. "terms": {
  96. "field": "gender",
  97. "size": 1000,
  98. "min_doc_count": 1,
  99. "shard_min_doc_count": 0,
  100. "show_term_doc_count_error": false,
  101. "order": [
  102. {
  103. "_count": "desc"
  104. },
  105. {
  106. "_key": "asc"
  107. }
  108. ]
  109. }
  110. },
  111. "Age": {
  112. "terms": {
  113. "field": "age_group",
  114. "size": 1000,
  115. "min_doc_count": 1,
  116. "shard_min_doc_count": 0,
  117. "show_term_doc_count_error": false,
  118. "order": [
  119. {
  120. "_count": "desc"
  121. },
  122. {
  123. "_key": "asc"
  124. }
  125. ]
  126. }
  127. },
  128. "Country": {
  129. "terms": {
  130. "field": "country",
  131. "size": 1000,
  132. "min_doc_count": 1,
  133. "shard_min_doc_count": 0,
  134. "show_term_doc_count_error": false,
  135. "order": [
  136. {
  137. "_count": "desc"
  138. },
  139. {
  140. "_key": "asc"
  141. }
  142. ]
  143. }
  144. },
  145. "Region": {
  146. "terms": {
  147. "field": "region",
  148. "size": 1000,
  149. "min_doc_count": 1,
  150. "shard_min_doc_count": 0,
  151. "show_term_doc_count_error": false,
  152. "order": [
  153. {
  154. "_count": "desc"
  155. },
  156. {
  157. "_key": "asc"
  158. }
  159. ]
  160. }
  161. },
  162. "Device": {
  163. "terms": {
  164. "field": "platform",
  165. "size": 1000,
  166. "min_doc_count": 1,
  167. "shard_min_doc_count": 0,
  168. "show_term_doc_count_error": false,
  169. "order": [
  170. {
  171. "_count": "desc"
  172. },
  173. {
  174. "_key": "asc"
  175. }
  176. ]
  177. }
  178. },
  179. "children": {
  180. "children": {
  181. "type": "action"
  182. },
  183. "aggregations": {
  184. "TopAmazonSearch": {
  185. "terms": {
  186. "field": "AmazonOnSiteSearch.keyword.raw",
  187. "size": 10,
  188. "min_doc_count": 1,
  189. "shard_min_doc_count": 0,
  190. "show_term_doc_count_error": false,
  191. "order": [
  192. {
  193. "_count": "desc"
  194. },
  195. {
  196. "_key": "asc"
  197. }
  198. ]
  199. }
  200. },
  201. "TopGoogleSearch": {
  202. "terms": {
  203. "field": "GoogleSearch.keyword.raw",
  204. "size": 1000,
  205. "min_doc_count": 1,
  206. "shard_min_doc_count": 0,
  207. "show_term_doc_count_error": false,
  208. "order": [
  209. {
  210. "_count": "desc"
  211. },
  212. {
  213. "_key": "asc"
  214. }
  215. ]
  216. }
  217. },
  218. "TopLandingDomains": {
  219. "terms": {
  220. "field": "GoogleSearch.landing_domain",
  221. "size": 10,
  222. "min_doc_count": 1,
  223. "shard_min_doc_count": 0,
  224. "show_term_doc_count_error": false,
  225. "order": [
  226. {
  227. "_count": "desc"
  228. },
  229. {
  230. "_key": "asc"
  231. }
  232. ]
  233. }
  234. },
  235. "TopProductPages": {
  236. "terms": {
  237. "field": "AmazonProductPage.page_url.raw",
  238. "size": 10,
  239. "min_doc_count": 1,
  240. "shard_min_doc_count": 0,
  241. "show_term_doc_count_error": false,
  242. "order": [
  243. {
  244. "_count": "desc"
  245. },
  246. {
  247. "_key": "asc"
  248. }
  249. ]
  250. }
  251. },
  252. "google_b300852c_7b31_42bd_b989_7dbb0f7c3d84": {
  253. "filter": {
  254. "bool": {
  255. "filter": [
  256. {
  257. "term": {
  258. "uuid": {
  259. "value": "0000fbca0e32f72e76ca132e9b79da30",
  260. "boost": 1
  261. }
  262. }
  263. },
  264. {
  265. "bool": {
  266. "filter": [
  267. {
  268. "bool": {
  269. "should": [
  270. {
  271. "match_phrase": {
  272. "GoogleSearch.keyword": {
  273. "query": "youtube",
  274. "slop": 0,
  275. "boost": 1
  276. }
  277. }
  278. }
  279. ],
  280. "adjust_pure_negative": true,
  281. "boost": 1
  282. }
  283. },
  284. {
  285. "range": {
  286. "timestamp": {
  287. "from": 1509554616147,
  288. "to": null,
  289. "include_lower": true,
  290. "include_upper": true,
  291. "boost": 1
  292. }
  293. }
  294. }
  295. ],
  296. "adjust_pure_negative": true,
  297. "boost": 1
  298. }
  299. }
  300. ],
  301. "adjust_pure_negative": true,
  302. "boost": 1
  303. }
  304. },
  305. "aggregations": {
  306. "actions": {
  307. "terms": {
  308. "field": "GoogleSearch.keyword.raw",
  309. "size": 1000,
  310. "min_doc_count": 1,
  311. "shard_min_doc_count": 0,
  312. "show_term_doc_count_error": false,
  313. "order": [
  314. {
  315. "_count": "desc"
  316. },
  317. {
  318. "_key": "asc"
  319. }
  320. ]
  321. },
  322. "aggregations": {
  323. "uniqueIds": {
  324. "cardinality": {
  325. "field": "join_field#uuid",
  326. "precision_threshold": 20000
  327. }
  328. }
  329. }
  330. },
  331. "landingPages": {
  332. "terms": {
  333. "field": "GoogleSearch.landing_domain",
  334. "size": 1000,
  335. "min_doc_count": 1,
  336. "shard_min_doc_count": 0,
  337. "show_term_doc_count_error": false,
  338. "order": [
  339. {
  340. "_count": "desc"
  341. },
  342. {
  343. "_key": "asc"
  344. }
  345. ]
  346. },
  347. "aggregations": {
  348. "counts": {
  349. "terms": {
  350. "field": "GoogleSearch.click_type",
  351. "size": 10,
  352. "min_doc_count": 1,
  353. "shard_min_doc_count": 0,
  354. "show_term_doc_count_error": false,
  355. "order": [
  356. {
  357. "_count": "desc"
  358. },
  359. {
  360. "_key": "asc"
  361. }
  362. ]
  363. }
  364. },
  365. "uniqueIds": {
  366. "cardinality": {
  367. "field": "join_field#uuid",
  368. "precision_threshold": 20000
  369. }
  370. }
  371. }
  372. }
  373. }
  374. },
  375. "google_2b246d84_2518_4002_b579_5339cfe4be00": {
  376. "filter": {
  377. "bool": {
  378. "filter": [
  379. {
  380. "term": {
  381. "uuid": {
  382. "value": "0000fbca0e32f72e76ca132e9b79da35",
  383. "boost": 1
  384. }
  385. }
  386. },
  387. {
  388. "bool": {
  389. "filter": [
  390. {
  391. "bool": {
  392. "should": [
  393. {
  394. "match_phrase": {
  395. "GoogleSearch.keyword": {
  396. "query": "youtube",
  397. "slop": 0,
  398. "boost": 1
  399. }
  400. }
  401. }
  402. ],
  403. "adjust_pure_negative": true,
  404. "boost": 1
  405. }
  406. },
  407. {
  408. "range": {
  409. "timestamp": {
  410. "from": 1509557283840,
  411. "to": null,
  412. "include_lower": true,
  413. "include_upper": true,
  414. "boost": 1
  415. }
  416. }
  417. }
  418. ],
  419. "adjust_pure_negative": true,
  420. "boost": 1
  421. }
  422. }
  423. ],
  424. "adjust_pure_negative": true,
  425. "boost": 1
  426. }
  427. },
  428. "aggregations": {
  429. "actions": {
  430. "terms": {
  431. "field": "GoogleSearch.keyword.raw",
  432. "size": 1000,
  433. "min_doc_count": 1,
  434. "shard_min_doc_count": 0,
  435. "show_term_doc_count_error": false,
  436. "order": [
  437. {
  438. "_count": "desc"
  439. },
  440. {
  441. "_key": "asc"
  442. }
  443. ]
  444. },
  445. "aggregations": {
  446. "uniqueIds": {
  447. "cardinality": {
  448. "field": "join_field#uuid",
  449. "precision_threshold": 20000
  450. }
  451. }
  452. }
  453. },
  454. "landingPages": {
  455. "terms": {
  456. "field": "GoogleSearch.landing_domain",
  457. "size": 1000,
  458. "min_doc_count": 1,
  459. "shard_min_doc_count": 0,
  460. "show_term_doc_count_error": false,
  461. "order": [
  462. {
  463. "_count": "desc"
  464. },
  465. {
  466. "_key": "asc"
  467. }
  468. ]
  469. },
  470. "aggregations": {
  471. "counts": {
  472. "terms": {
  473. "field": "GoogleSearch.click_type",
  474. "size": 10,
  475. "min_doc_count": 1,
  476. "shard_min_doc_count": 0,
  477. "show_term_doc_count_error": false,
  478. "order": [
  479. {
  480. "_count": "desc"
  481. },
  482. {
  483. "_key": "asc"
  484. }
  485. ]
  486. }
  487. },
  488. "uniqueIds": {
  489. "cardinality": {
  490. "field": "join_field#uuid",
  491. "precision_threshold": 20000
  492. }
  493. }
  494. }
  495. }
  496. }
  497. },
  498. "amazon_7fbf2a38_6893_4eec_b10e_f06690910d67": {
  499. "filter": {
  500. "bool": {
  501. "filter": [
  502. {
  503. "bool": {
  504. "should": [
  505. {
  506. "match_phrase": {
  507. "AmazonOnSiteSearch.keyword": {
  508. "query": "printer",
  509. "slop": 0,
  510. "boost": 1
  511. }
  512. }
  513. }
  514. ],
  515. "adjust_pure_negative": true,
  516. "boost": 1
  517. }
  518. }
  519. ],
  520. "adjust_pure_negative": true,
  521. "boost": 1
  522. }
  523. },
  524. "aggregations": {
  525. "actions": {
  526. "terms": {
  527. "field": "AmazonOnSiteSearch.keyword.raw",
  528. "size": 1000,
  529. "min_doc_count": 1,
  530. "shard_min_doc_count": 0,
  531. "show_term_doc_count_error": false,
  532. "order": [
  533. {
  534. "_count": "desc"
  535. },
  536. {
  537. "_key": "asc"
  538. }
  539. ]
  540. },
  541. "aggregations": {
  542. "uniqueIds": {
  543. "cardinality": {
  544. "field": "join_field#uuid",
  545. "precision_threshold": 20000
  546. }
  547. }
  548. }
  549. },
  550. "landingPages": {
  551. "terms": {
  552. "field": "GoogleSearch.landing_domain",
  553. "size": 1000,
  554. "min_doc_count": 1,
  555. "shard_min_doc_count": 0,
  556. "show_term_doc_count_error": false,
  557. "order": [
  558. {
  559. "_count": "desc"
  560. },
  561. {
  562. "_key": "asc"
  563. }
  564. ]
  565. },
  566. "aggregations": {
  567. "counts": {
  568. "terms": {
  569. "field": "GoogleSearch.click_type",
  570. "size": 10,
  571. "min_doc_count": 1,
  572. "shard_min_doc_count": 0,
  573. "show_term_doc_count_error": false,
  574. "order": [
  575. {
  576. "_count": "desc"
  577. },
  578. {
  579. "_key": "asc"
  580. }
  581. ]
  582. }
  583. },
  584. "uniqueIds": {
  585. "cardinality": {
  586. "field": "join_field#uuid",
  587. "precision_threshold": 20000
  588. }
  589. }
  590. }
  591. }
  592. }
  593. }
  594. }
  595. }
  596. }
  597. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement