Advertisement
Guest User

Untitled

a guest
Nov 13th, 2020
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 16.03 KB | None | 0 0
  1. {
  2.     "from": 0,
  3.     "size": 20,
  4.     "query": {
  5.         "bool": {
  6.             "must": [
  7.                 {
  8.                     "bool": {
  9.                         "should": [
  10.                             {
  11.                                 "nested": {
  12.                                     "query": {
  13.                                         "bool": {
  14.                                             "must": [
  15.                                                 {
  16.                                                     "range": {
  17.                                                         "genericNames.startDate": {
  18.                                                             "from": null,
  19.                                                             "to": "2020-11-12T00:00:00.000000+0000",
  20.                                                             "include_lower": true,
  21.                                                             "include_upper": true,
  22.                                                             "boost": 1.0
  23.                                                         }
  24.                                                     }
  25.                                                 },
  26.                                                 {
  27.                                                     "range": {
  28.                                                         "genericNames.endDate": {
  29.                                                             "from": "2020-11-12T00:00:00.000000+0000",
  30.                                                             "to": null,
  31.                                                             "include_lower": true,
  32.                                                             "include_upper": true,
  33.                                                             "boost": 1.0
  34.                                                         }
  35.                                                     }
  36.                                                 },
  37.                                                 {
  38.                                                     "match_phrase": {
  39.                                                         "genericNames.name": {
  40.                                                             "query": "phenoxymethylpenicillin",
  41.                                                             "slop": 15,
  42.                                                             "zero_terms_query": "NONE",
  43.                                                             "boost": 1.0
  44.                                                         }
  45.                                                     }
  46.                                                 },
  47.                                                 {
  48.                                                     "term": {
  49.                                                         "genericNames.nameType": {
  50.                                                             "value": 1,
  51.                                                             "boost": 1.0
  52.                                                         }
  53.                                                     }
  54.                                                 }
  55.                                             ],
  56.                                             "adjust_pure_negative": true,
  57.                                             "boost": 1.0
  58.                                         }
  59.                                     },
  60.                                     "path": "genericNames",
  61.                                     "ignore_unmapped": false,
  62.                                     "score_mode": "sum",
  63.                                     "boost": 1.0
  64.                                 }
  65.                             },
  66.                             {
  67.                                 "nested": {
  68.                                     "query": {
  69.                                         "bool": {
  70.                                             "must": [
  71.                                                 {
  72.                                                     "range": {
  73.                                                         "genericNames.startDate": {
  74.                                                             "from": null,
  75.                                                             "to": "2020-11-12T00:00:00.000000+0000",
  76.                                                             "include_lower": true,
  77.                                                             "include_upper": true,
  78.                                                             "boost": 1.0
  79.                                                         }
  80.                                                     }
  81.                                                 },
  82.                                                 {
  83.                                                     "range": {
  84.                                                         "genericNames.endDate": {
  85.                                                             "from": "2020-11-12T00:00:00.000000+0000",
  86.                                                             "to": null,
  87.                                                             "include_lower": true,
  88.                                                             "include_upper": true,
  89.                                                             "boost": 1.0
  90.                                                         }
  91.                                                     }
  92.                                                 },
  93.                                                 {
  94.                                                     "match_phrase": {
  95.                                                         "genericNames.name.name_reversed": {
  96.                                                             "query": "nillicineplyhtemyxonehp",
  97.                                                             "slop": 15,
  98.                                                             "zero_terms_query": "NONE",
  99.                                                             "boost": 1.0
  100.                                                         }
  101.                                                     }
  102.                                                 },
  103.                                                 {
  104.                                                     "term": {
  105.                                                         "genericNames.nameType": {
  106.                                                             "value": 1,
  107.                                                             "boost": 1.0
  108.                                                         }
  109.                                                     }
  110.                                                 }
  111.                                             ],
  112.                                             "adjust_pure_negative": true,
  113.                                             "boost": 1.0
  114.                                         }
  115.                                     },
  116.                                     "path": "genericNames",
  117.                                     "ignore_unmapped": false,
  118.                                     "score_mode": "sum",
  119.                                     "boost": 1.0
  120.                                 }
  121.                             },
  122.                             {
  123.                                 "nested": {
  124.                                     "query": {
  125.                                         "bool": {
  126.                                             "must": [
  127.                                                 {
  128.                                                     "range": {
  129.                                                         "proprietaryNames.startDate": {
  130.                                                             "from": null,
  131.                                                             "to": "2020-11-12T00:00:00.000000+0000",
  132.                                                             "include_lower": true,
  133.                                                             "include_upper": true,
  134.                                                             "boost": 1.0
  135.                                                         }
  136.                                                     }
  137.                                                 },
  138.                                                 {
  139.                                                     "range": {
  140.                                                         "proprietaryNames.endDate": {
  141.                                                             "from": "2020-11-12T00:00:00.000000+0000",
  142.                                                             "to": null,
  143.                                                             "include_lower": true,
  144.                                                             "include_upper": true,
  145.                                                             "boost": 1.0
  146.                                                         }
  147.                                                     }
  148.                                                 },
  149.                                                 {
  150.                                                     "match_phrase": {
  151.                                                         "proprietaryNames.name": {
  152.                                                             "query": "phenoxymethylpenicillin",
  153.                                                             "slop": 15,
  154.                                                             "zero_terms_query": "NONE",
  155.                                                             "boost": 1.0
  156.                                                         }
  157.                                                     }
  158.                                                 },
  159.                                                 {
  160.                                                     "term": {
  161.                                                         "proprietaryNames.nameType": {
  162.                                                             "value": 1,
  163.                                                             "boost": 1.0
  164.                                                         }
  165.                                                     }
  166.                                                 }
  167.                                             ],
  168.                                             "adjust_pure_negative": true,
  169.                                             "boost": 1.0
  170.                                         }
  171.                                     },
  172.                                     "path": "proprietaryNames",
  173.                                     "ignore_unmapped": false,
  174.                                     "score_mode": "sum",
  175.                                     "boost": 1.0
  176.                                 }
  177.                             },
  178.                             {
  179.                                 "nested": {
  180.                                     "query": {
  181.                                         "bool": {
  182.                                             "must": [
  183.                                                 {
  184.                                                     "range": {
  185.                                                         "proprietaryNames.startDate": {
  186.                                                             "from": null,
  187.                                                             "to": "2020-11-12T00:00:00.000000+0000",
  188.                                                             "include_lower": true,
  189.                                                             "include_upper": true,
  190.                                                             "boost": 1.0
  191.                                                         }
  192.                                                     }
  193.                                                 },
  194.                                                 {
  195.                                                     "range": {
  196.                                                         "proprietaryNames.endDate": {
  197.                                                             "from": "2020-11-12T00:00:00.000000+0000",
  198.                                                             "to": null,
  199.                                                             "include_lower": true,
  200.                                                             "include_upper": true,
  201.                                                             "boost": 1.0
  202.                                                         }
  203.                                                     }
  204.                                                 },
  205.                                                 {
  206.                                                     "match_phrase": {
  207.                                                         "proprietaryNames.name.name_reversed": {
  208.                                                             "query": "nillicineplyhtemyxonehp",
  209.                                                             "slop": 15,
  210.                                                             "zero_terms_query": "NONE",
  211.                                                             "boost": 1.0
  212.                                                         }
  213.                                                     }
  214.                                                 },
  215.                                                 {
  216.                                                     "term": {
  217.                                                         "proprietaryNames.nameType": {
  218.                                                             "value": 1,
  219.                                                             "boost": 1.0
  220.                                                         }
  221.                                                     }
  222.                                                 }
  223.                                             ],
  224.                                             "adjust_pure_negative": true,
  225.                                             "boost": 1.0
  226.                                         }
  227.                                     },
  228.                                     "path": "proprietaryNames",
  229.                                     "ignore_unmapped": false,
  230.                                     "score_mode": "sum",
  231.                                     "boost": 1.0
  232.                                 }
  233.                             }
  234.                         ],
  235.                         "adjust_pure_negative": true,
  236.                         "boost": 1.0
  237.                     }
  238.                 },
  239.                 {
  240.                     "bool": {
  241.                         "must": [
  242.                             {
  243.                                 "terms": {
  244.                                     "invalidEntry": [
  245.                                         false
  246.                                     ],
  247.                                     "boost": 1.0
  248.                                 }
  249.                             }
  250.                         ],
  251.                         "adjust_pure_negative": true,
  252.                         "boost": 1.0
  253.                     }
  254.                 },
  255.                 {
  256.                     "bool": {
  257.                         "must": [
  258.                             {
  259.                                 "terms": {
  260.                                     "extractableEntry": [
  261.                                         true
  262.                                     ],
  263.                                     "boost": 1.0
  264.                                 }
  265.                             }
  266.                         ],
  267.                         "adjust_pure_negative": true,
  268.                         "boost": 1.0
  269.                     }
  270.                 }
  271.             ],
  272.             "adjust_pure_negative": true,
  273.             "boost": 1.0
  274.         }
  275.     },
  276.     "_source": {
  277.         "includes": [
  278.             "suppliers",
  279.             "invalidEntry",
  280.             "qtyVal",
  281.             "attributes",
  282.             "snomedCodes",
  283.             "genericNames",
  284.             "proprietaryNames",
  285.             "id",
  286.             "pitId",
  287.             "vmpId",
  288.             "ampId",
  289.             "vmppId",
  290.             "amppId"
  291.         ],
  292.         "excludes": []
  293.     },
  294.     "track_total_hits": 2147483647
  295. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement