Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "size": 0,
- "query": {
- "terms":{
- "uuid":["0fef66c39b07247f70350cfaba5a6b85"]
- }
- },
- "aggregations": {
- "group_by": {
- "terms": {
- "field": "uuid",
- "include": {
- "partition": 0,
- "num_partitions": 100
- },
- "size": 10000,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "children": {
- "children": {
- "type": "action"
- },
- "aggregations": {
- "google_actions_a1": {
- "filter": {
- "bool": {
- "filter": [
- {
- "bool": {
- "should": [
- {
- "match_phrase": {
- "GoogleSearch.keyword": {
- "query": "youtube",
- "slop": 0,
- "boost": 1
- }
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1
- }
- },
- "aggregations": {
- "group_by_timestamp": {
- "terms": {
- "field": "timestamp",
- "size": 1000
- }
- },
- "actions": {
- "terms": {
- "field": "GoogleSearch.keyword.raw",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- },
- "landingPages": {
- "terms": {
- "field": "GoogleSearch.landing_domain",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "counts": {
- "terms": {
- "field": "GoogleSearch.click_type",
- "size": 10,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- }
- },
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- }
- }
- },
- "amazon_actions_a1": {
- "filter": {
- "bool": {
- "should": [
- {
- "match_phrase": {
- "AmazonOnSiteSearch.keyword.raw": {
- "query": "hand spinner",
- "slop": 0,
- "boost": 1
- }
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1
- }
- },
- "aggs": {
- "group_by_timestamp": {
- "terms": {
- "field": "timestamp",
- "size": 1000
- }
- },
- "actions": {
- "terms": {
- "field": "AmazonOnSiteSearch.keyword.raw",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- },
- "landingPages": {
- "terms": {
- "field": "GoogleSearch.landing_domain",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "counts": {
- "terms": {
- "field": "GoogleSearch.click_type",
- "size": 10,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- }
- },
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- }
- }
- },
- "google_actions_a2": {
- "filter": {
- "bool": {
- "filter": [
- {
- "bool": {
- "should": [
- {
- "match_phrase": {
- "GoogleSearch.keyword": {
- "query": "facebook",
- "slop": 0,
- "boost": 1
- }
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1
- }
- },
- "aggregations": {
- "group_by_timestamp": {
- "terms": {
- "field": "timestamp",
- "size": 1000
- }
- },
- "actions": {
- "terms": {
- "field": "GoogleSearch.keyword.raw",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- },
- "landingPages": {
- "terms": {
- "field": "GoogleSearch.landing_domain",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "counts": {
- "terms": {
- "field": "GoogleSearch.click_type",
- "size": 10,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- }
- },
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- }
- }
- },
- "amazon_actions_a2": {
- "filter": {
- "bool": {
- "should": [
- {
- "match_phrase": {
- "AmazonOnSiteSearch.keyword.raw": {
- "query": "spinner",
- "slop": 0,
- "boost": 1
- }
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1
- }
- },
- "aggs": {
- "group_by_timestamp": {
- "terms": {
- "field": "timestamp",
- "size": 1000
- }
- },
- "actions": {
- "terms": {
- "field": "AmazonOnSiteSearch.keyword.raw",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- },
- "landingPages": {
- "terms": {
- "field": "GoogleSearch.landing_domain",
- "size": 1000,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- },
- "aggregations": {
- "counts": {
- "terms": {
- "field": "GoogleSearch.click_type",
- "size": 10,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- }
- },
- "uniqueIds": {
- "cardinality": {
- "field": "join_field#uuid"
- }
- }
- }
- }
- }
- },
- "TopGoogleSearch": {
- "terms": {
- "field": "GoogleSearch.keyword.raw",
- "size": 10,
- "min_doc_count": 1,
- "shard_min_doc_count": 0,
- "show_term_doc_count_error": false,
- "order": [
- {
- "_count": "desc"
- },
- {
- "_key": "asc"
- }
- ]
- }
- }
- }
- },
- "zeroAmazonActionsFiltering": {
- "bucket_selector": {
- "buckets_path": {
- "googleNumOfActionsA1": "children>google_actions_a1._count",
- "amazonNumOfActionsA1": "children>amazon_actions_a1._count",
- "googleNumOfActionsA2": "children>google_actions_a2._count",
- "amazonNumOfActionsA2": "children>amazon_actions_a2._count"
- },
- "script": "(params.googleNumOfActionsA1>0&¶ms.amazonNumOfActionsA1>0)&&(params.googleNumOfActionsA2>0&¶ms.amazonNumOfActionsA2>0)"
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement