Advertisement
Guest User

Basic query

a guest
Mar 29th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.64 KB | None | 0 0
  1. {
  2.     "from": 0,
  3.     "size": 12,
  4.     "query": {
  5.         "bool": {
  6.             "must": [
  7.                 {
  8.                     "bool": {
  9.                         "should": [
  10.                             {
  11.                                 "bool": {
  12.                                     "should": {
  13.                                         "match": {
  14.                                             "reference": 0
  15.                                         }
  16.                                     },
  17.                                     "boost": 2
  18.                                 }
  19.                             },
  20.                             {
  21.                                 "match": {
  22.                                     "name": {
  23.                                         "query": "choco",
  24.                                         "cutoff_frequency": 0.01,
  25.                                         "analyzer": "french",
  26.                                         "fuzziness": "AUTO"
  27.                                     }
  28.                                 }
  29.                             }
  30.                         ]
  31.                     }
  32.                 },
  33.                 {
  34.                     "match": {
  35.                         "family.value": "viennoiserie"
  36.                     }
  37.                 }
  38.             ]
  39.         }
  40.     },
  41.     "highlight": {
  42.         "fields": {
  43.             "name": {
  44.                 "type": "plain"
  45.             }
  46.         }
  47.     },
  48.     "_source": [
  49.         "name",
  50.         "reference",
  51.         "new",
  52.         "pictures",
  53.         "bestSeller",
  54.         "href",
  55.         "implementationStep",
  56.         "implementationSteps"
  57.     ]
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement