Last active
November 1, 2024 19:33
-
-
Save horacioibrahim/51bd32c19391dce6269dce586b579d05 to your computer and use it in GitHub Desktop.
Get user_id from Click from Elastic "Cancelar protesta"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // POST /events_new-dedicated-01_click/_search | |
| { | |
| "sort": [ | |
| { | |
| "inserted_date": { | |
| "order": "desc", | |
| "format": "strict_date_optional_time", | |
| "unmapped_type": "boolean" | |
| } | |
| } | |
| ], | |
| "track_total_hits": false, | |
| "fields": [ | |
| { | |
| "field": "inserted_date", | |
| "format": "strict_date_optional_time" | |
| } | |
| ], | |
| "size": 500, | |
| "version": true, | |
| "script_fields": {}, | |
| "stored_fields": [ | |
| "*" | |
| ], | |
| "_source": ["user_id"], | |
| "query": { | |
| "bool": { | |
| "must": [], | |
| "filter": [ | |
| { | |
| "exists": { | |
| "field": "user_id" | |
| } | |
| }, | |
| { | |
| "bool": { | |
| "filter": [ | |
| { | |
| "bool": { | |
| "should": [ | |
| { | |
| "term": { | |
| "app_package_name.keyword": { | |
| "value": "www.pesquisaprotesto.com.br" | |
| } | |
| } | |
| } | |
| ], | |
| "minimum_should_match": 1 | |
| } | |
| }, | |
| { | |
| "bool": { | |
| "should": [ | |
| { | |
| "term": { | |
| "event_name.keyword": { | |
| "value": "click" | |
| } | |
| } | |
| } | |
| ], | |
| "minimum_should_match": 1 | |
| } | |
| }, | |
| { | |
| "bool": { | |
| "should": [ | |
| { | |
| "term": { | |
| "event_data.element_label.keyword": { | |
| "value": "Cancelar protesto" | |
| } | |
| } | |
| } | |
| ], | |
| "minimum_should_match": 1 | |
| } | |
| }, | |
| { | |
| "bool": { | |
| "should": [ | |
| { | |
| "term": { | |
| "relative_view.keyword": { | |
| "value": "/consulta" | |
| } | |
| } | |
| } | |
| ], | |
| "minimum_should_match": 1 | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "range": { | |
| "inserted_date": { | |
| "format": "strict_date_optional_time", | |
| "gte": "2024-10-31T19:00:00.000Z", | |
| "lte": "2024-11-01T19:01:28.959Z" | |
| } | |
| } | |
| } | |
| ], | |
| "should": [], | |
| "must_not": [] | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment