Skip to content

Instantly share code, notes, and snippets.

@chiragpurohit71085
Last active June 28, 2024 07:29
Show Gist options
  • Save chiragpurohit71085/294e1fe395194334c154086e0357200b to your computer and use it in GitHub Desktop.
Save chiragpurohit71085/294e1fe395194334c154086e0357200b to your computer and use it in GitHub Desktop.
elastic-search
POST /state_compliance/_analyze
{
"field": "data",
"text": "123456AB1"
}
GET /state_compliance/_mapping
GET /state_compliance/_search
{
"size": 25,
"from": 0,
"query": {
"bool": {
"must":[
{
"term":{
"data":{
"value":"123456AB1"
}
}
}
]
}
},
"sort": [
{
"state_id.keyword": {
"order": "asc",
"unmapped_type": "keyword"
}
},
{
"rec_type.keyword": {
"order": "asc",
"unmapped_type": "keyword"
}
},
{
"occ.keyword": {
"order": "asc",
"unmapped_type": "keyword"
}
}
]
}
GET /state_compliance/_search
{
"size":25,
"from":0,
"query":{
"bool":{
"must":[
{
"query_string":{
"default_field":"data",
"query":"123456AB1"
}
}
]
}
},
"sort":[
{
"state_id.keyword":{
"order":"asc",
"unmapped_type":"keyword"
}
},
{
"rec_type.keyword":{
"order":"asc",
"unmapped_type":"keyword"
}
},
{
"occ.keyword":{
"order":"asc",
"unmapped_type":"keyword"
}
}
]
}
GET catab00mas/_search
{
"size":10000,
"query": {
"match_all": {}
}
}
GET cardhmaster/_search
{
"size":10000,
"query": {
"match_all": {}
}
}
GET cardhmaster/_search
{
"query": {
"bool": {
"must": [
{
"bool": {
"should": [
{
"bool": {
"must_not": {
"exists": {
"field": "crd_eff_date_1"
}
}
}
},
{
"range": {
"crd_eff_date_1": {
"lte": "now"
}
}
}
]
}
},
{
"bool": {
"should": [
{
"bool": {
"must_not": {
"exists": {
"field": "crd_ter_date_1"
}
}
}
},
{
"range": {
"crd_ter_date_1": {
"gte": "now"
}
}
}
]
}
}
]
}
}
}
GET cardhmaster/_search
{
"query": {
"bool":{
"should":[
{
"bool":{
"must":{
"exists":{
"field":"crd_ter_date_1"
}
}
}
},
{
"range":{
"crd_ter_date_1":{
"lte":"now"
}
}
}
]
}
}
}
GET pdmiportal_permissions/_search
{"from":0,"size":2500,"query":{"bool":{"must":[{"match":{"UserCustomer.entity_id.keyword":"CUST_PBM_GROUP_92023"}}]}}}
GET pdmiportal_permissions/_search
{"from":0,"size":2500,"query":{"bool":{"must":[{"match":{"UserCustomer.name_search":"CUST_PBM_GROUP_92023"}}]}}}
GET pdmiportal_permissions/_search
{"query":{"bool":{"must":[{"query_string":{"default_field":"name_search","query":"*CUST_GENERIC_Pharmacy_KT*","default_operator":"AND"}},{"match":{"applied_to":"cust_pbm"}}]}},"from":0,"size":"10","track_total_hits":true}
GET claim_enrichment_update/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"bool":{
"must":[
{
"wildcard":{
"uid.keyword":"6721f62b-dbc4-4acf-9a48-4e3c0e1f12f6"
}
}
]
}
}
]
}
}
}
GET claim_enrichment_update/_search
{
"size":10000,
"query": {
"match_all": {}
}
}
GET drug000mas/_search
{"from":0,"size":10,"track_total_hits":true,"query":{"bool":{"must":[{"regexp":{"prod_descr_abbr.keyword":{"value":".*MODESS.*","flags":"ALL","case_insensitive":true}}},{"bool":{"should":[{"term":{"type_cd.keyword":"1"}},{"term":{"type_cd.keyword":"2"}},{"term":{"type_cd.keyword":"3"}}]}},{"bool":{"should":[{"term":{"status_flag.keyword":"Z"}},{"term":{"status_flag.keyword":"I"}}]}}]}}}
GET pdmiportal_permissions/_search
{"query":{"bool":{"must":[{"term":{"entity_id.keyword":"usr_452e2c27-4023-4e02-8278-da3b4a3171b4"}},{"prefix":{"applied_to":"role_"}}]}}}
GET claim_enrichment_update/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"bool":{
"must":[
{
"wildcard":{
"uid.keyword":"6721f62b-dbc4-4acf-9a48-4e3c0e1f12f6"
}
}
]
}
}
]
}
}
}
GET pdmiportal_permissions/_search
{
"size": 10000,
"query":{
"bool":{
"must":[
{
"term":{
"entity_id.keyword":"user_permission"
}
},
{
"term":{
"applied_to.keyword":"usr_66b5dee1-90dc-4964-86f4-b98ba8576872"
}
}
]
}
}
}
GET claim_enrichment_update/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"bool":{
"must":[
{
"wildcard":{
"batch_master.keyword":"????Y*"
}
}
]
}
}
]
}
}
}
GET pdmiportal_permissions/_search
{
"size": 10000,
"query":{
"bool":{
"must":[
{
"term":{
"entity_id.keyword":"usr_452e2c27-4023-4e02-8278-da3b4a3171b4"
}
},
{
"prefix":{
"applied_to":"role_"
}
}
]
}
}
}
GET pdmiportal_permissions/_search
{
"query":{
"bool":{
"must":[
{
"term":{
"entity_id.keyword":"role_ncpdpfullaccess-app_ncpdpfinance"
}
},
{
"wildcard":{
"applied_to":"perm_*"
}
}
]
}
}
}
GET claim_enrichment/_search
{
"query": {
"match_all": {}
}
}
GET drug000mas/_search
{
"size":10000,
"query": {
"match_all": {}
}
}
GET drug000mas/_search
{
"query": {
"term": {
"dr_ndc": "8004016200"
}
}
}
GET drug000mas/_search
{
"from":0,
"size":100,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"wildcard":{
"manuf_name_abbr":"mod"
}
},
{
"bool":{
"should":[
{
"term":{
"type_cd.keyword":"1"
}
},
{
"term":{
"type_cd.keyword":"2"
}
},
{
"term":{
"type_cd.keyword":"3"
}
}
]
}
}
],
"must_not":[
{
"term":{
"status_flag.keyword":"Z"
}
},
{
"term":{
"status_flag.keyword":"I"
}
}
]
}
}
}
GET drug000mas/_search
{
"size":10000,
"query":{
"bool":{
"must_not":[
{
"term":{
"status_flag.keyword":"Z"
}
},
{
"term":{
"status_flag.keyword":"I"
}
}
],
"should": [
{
"term":{
"type_cd.keyword":"1"
}
},
{
"term":{
"type_cd.keyword":"2"
}
},
{
"term":{
"type_cd.keyword":"3"
}
}
]
}
}
}
GET pdmiportal_permissions/_search
{
"size":1,
"query":{
"bool":{
"must":[
{
"term":{
"entity_id.keyword":"user_permission"
}
},
{
"term":{
"applied_to.keyword":"usr_66b5dee1-90dc-4964-86f4-b98ba8576872"
}
}
]
}
}
}
GET pdmiportal_permissions/_search
{
"size":1,
"query":{
"bool":{
"must":[
{
"term":{
"entity_id.keyword":"user_permission"
}
},
{
"term":{
"email.keyword":"karan.jain@yopmail.com"
}
}
]
}
}
}
GET pdmiportal_permissions/_search{    "size": 10000,   "query":{      "bool":{         "must":[            {               "term":{                  "entity_id.keyword":"user_permission"               }            },            {               "term":{                  "applied_to.keyword":"usr_66b5dee1-90dc-4964-86f4-b98ba8576872"               }            }         ]      }   } }
GET drug000mas/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"bool":{
"should":[
{
"term":{
"type_cd.keyword":"1"
}
},
{
"term":{
"type_cd.keyword":"2"
}
},
{
"term":{
"type_cd.keyword":"3"
}
}
]
}
}
],
"must_not":[
{
"term":{
"status_flag.keyword":"Z"
}
},
{
"term":{
"status_flag.keyword":"I"
}
}
]
}
}
}
GET drug000mas/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"term":{
"dr_ndc.keyword":"52735065608"
}
}
],
"should":[
{
"term":{
"type_cd.keyword":"1"
}
},
{
"term":{
"type_cd.keyword":"2"
}
},
{
"term":{
"type_cd.keyword":"3"
}
}
]
}
}
}
GET drug000mas/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"wildcard":{
"gpi":"971520000063*"
}
}
]
}
}
}
GET drug000mas/_search
{
"size":10000,
"query": {
"bool": {
"must":[{
"term":{
"status_flag.keyword":"A"
}
}]
}
}
}
GET /_search
{
"query": {
"regexp": {
"_source.claim_key": {
"value": "VC.*",
"flags": "ALL",
"case_insensitive": true,
"max_determinized_states": 10000,
"rewrite": "constant_score"
}
}
}
}
GET claim_enrichment/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"wildcard":{
"member_first":"*test*"
}
},
{
"bool":{
"should":[
{
"term":{
"system_number.keyword":{
"value":"196"
}
}
},
{
"term":{
"system_number.keyword":{
"value":163
}
}
},
{
"term":{
"system_number.keyword":{
"value":"123"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"48"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"118"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"197"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"195"
}
}
},
{
"term":{
"system_number.keyword":{
"value":99
}
}
},
{
"term":{
"system_number.keyword":{
"value":"105"
}
}
},
{
"term":{
"system_number.keyword":{
"value":73
}
}
},
{
"term":{
"system_number.keyword":{
"value":202
}
}
},
{
"term":{
"system_number.keyword":{
"value":184
}
}
},
{
"term":{
"system_number.keyword":{
"value":124
}
}
},
{
"term":{
"system_number.keyword":{
"value":134
}
}
},
{
"term":{
"system_number.keyword":{
"value":201
}
}
},
{
"term":{
"system_number.keyword":{
"value":78
}
}
},
{
"term":{
"system_number.keyword":{
"value":189
}
}
},
{
"term":{
"system_number.keyword":{
"value":"200"
}
}
},
{
"term":{
"system_number.keyword":{
"value":290
}
}
},
{
"term":{
"system_number.keyword":{
"value":208
}
}
},
{
"term":{
"system_number.keyword":{
"value":204
}
}
},
{
"term":{
"system_number.keyword":{
"value":203
}
}
},
{
"term":{
"system_number.keyword":{
"value":190
}
}
},
{
"term":{
"system_number.keyword":{
"value":"77"
}
}
},
{
"term":{
"system_number.keyword":{
"value":158
}
}
},
{
"term":{
"system_number.keyword":{
"value":215
}
}
},
{
"term":{
"system_number.keyword":{
"value":209
}
}
},
{
"term":{
"system_number.keyword":{
"value":2
}
}
},
{
"term":{
"system_number.keyword":{
"value":198
}
}
},
{
"term":{
"system_number.keyword":{
"value":1
}
}
},
{
"term":{
"system_number.keyword":{
"value":120
}
}
},
{
"term":{
"system_number.keyword":{
"value":210
}
}
},
{
"term":{
"system_number.keyword":{
"value":68
}
}
},
{
"term":{
"system_number.keyword":{
"value":213
}
}
}
]
}
},
{
"bool":{
"should":[
]
}
},
{
"bool":{
"should":[
]
}
},
{
"bool":{
"must":[
{
"wildcard":{
"claim_key.keyword":"????Y*"
}
}
]
}
}
]
}
}
}
GET claim_enrichment/_search
{
"from":0,
"size":10,
"track_total_hits":true,
"query":{
"bool":{
"must":[
{
"wildcard":{
"member_first":"*test*"
}
},
{
"bool":{
"should":[
{
"term":{
"system_number.keyword":{
"value":"196"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"123"
}
}
},
{
"term":{
"system_number.keyword":{
"value":163
}
}
},
{
"term":{
"system_number.keyword":{
"value":"48"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"195"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"197"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"118"
}
}
},
{
"term":{
"system_number.keyword":{
"value":"105"
}
}
},
{
"term":{
"system_number.keyword":{
"value":99
}
}
},
{
"term":{
"system_number.keyword":{
"value":73
}
}
},
{
"term":{
"system_number.keyword":{
"value":184
}
}
},
{
"term":{
"system_number.keyword":{
"value":124
}
}
},
{
"term":{
"system_number.keyword":{
"value":202
}
}
},
{
"term":{
"system_number.keyword":{
"value":134
}
}
},
{
"term":{
"system_number.keyword":{
"value":201
}
}
},
{
"term":{
"system_number.keyword":{
"value":78
}
}
},
{
"term":{
"system_number.keyword":{
"value":189
}
}
},
{
"term":{
"system_number.keyword":{
"value":"200"
}
}
},
{
"term":{
"system_number.keyword":{
"value":290
}
}
},
{
"term":{
"system_number.keyword":{
"value":208
}
}
},
{
"term":{
"system_number.keyword":{
"value":204
}
}
},
{
"term":{
"system_number.keyword":{
"value":203
}
}
},
{
"term":{
"system_number.keyword":{
"value":190
}
}
},
{
"term":{
"system_number.keyword":{
"value":"77"
}
}
},
{
"term":{
"system_number.keyword":{
"value":158
}
}
},
{
"term":{
"system_number.keyword":{
"value":209
}
}
},
{
"term":{
"system_number.keyword":{
"value":2
}
}
},
{
"term":{
"system_number.keyword":{
"value":1
}
}
},
{
"term":{
"system_number.keyword":{
"value":215
}
}
},
{
"term":{
"system_number.keyword":{
"value":198
}
}
},
{
"term":{
"system_number.keyword":{
"value":210
}
}
},
{
"term":{
"system_number.keyword":{
"value":120
}
}
},
{
"term":{
"system_number.keyword":{
"value":213
}
}
},
{
"term":{
"system_number.keyword":{
"value":68
}
}
}
]
}
},
{
"bool":{
"should":[
]
}
},
{
"bool":{
"should":[
]
}
},
{
"bool":{
"must":[
{
"regexp":{
"claim_key.keyword":{
"value":"....Y.*",
"flags":"ALL",
"case_insensitive":true
}
}
}
]
}
}
]
}
}
}
GET claim_enrichment/_search
{
"query":{
"bool":{
"must":[
{
"wildcard":{
"member_first":"*test*"
}
},
{
"bool":{
"must":[
{
"regexp":{
"claim_key.keyword":{
"value":"....Y.*",
"flags":"ALL",
"case_insensitive":true
}
}
},
{
"term":{
"batch_master.keyword":{
"value":"WE18Y051"
}
}
}
]
}
}
]
}
}
}
GET claim_enrichment/_search
{
"query":{
"regexp":{
"claim_key": {
"value": "....x.*",
"flags": "ALL",
"case_insensitive": true,
"max_determinized_states": 10000,
"rewrite": "constant_score"
}
}
}
}
GET claim_enrichment/_search
{
"query":{
"wildcard":{
"member_first":"michelle"
}
}
}
#---------------
GET claim_enrichment/_search
{
"query": {
"bool": {
"must": [
{
"term": {
"cardholder_number": "12345"
}
}
]
}
}
}
#---------------
GET claim_enrichment/_search
{
"query": {
"bool": {
"must": [
{
"wildcard":{
"member_first":"michelle"
}
},
{
"wildcard":{
"member_first":"michelle"
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment