Advertisement
Guest User

Untitled

a guest
Apr 13th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.25 KB | None | 0 0
  1.  
  2. PUT testing
  3. {
  4.     "mappings": {
  5.         "stuff": {
  6.             "properties": {
  7.                 "slug": {
  8.                     "type": "string",
  9.                     "index": "not_analyzed"
  10.                 },
  11.                 "score": {
  12.                     "type": "float"
  13.                 },
  14.                 "variations": {
  15.                     "type": "nested",
  16.                     "properties": {
  17.                         "color": {
  18.                             "type": "string",
  19.                             "index": "not_analyzed"
  20.                         },
  21.                         "score": {
  22.                             "type": "float"
  23.                         }
  24.                     }
  25.                 }
  26.             }
  27.         }
  28.     }
  29. }
  30.  
  31.  
  32. PUT /testing/stuff/foo-1
  33. {
  34.     "slug": "foo-1",
  35.     "score": 20,
  36.     "variations": [
  37.         {
  38.             "color": "black",
  39.             "score": 1.0
  40.         },
  41.         {
  42.             "color": "white",
  43.             "score": 1.2
  44.         }
  45.     ]
  46. }
  47.  
  48.  
  49. PUT /testing/stuff/foo-2
  50. {
  51.     "slug": "foo-2",
  52.     "score": 10,
  53.     "variations": [
  54.         {
  55.             "color": "pink",
  56.             "score": 2.22
  57.         },
  58.         {
  59.             "color": "blue",
  60.             "score": 2.00
  61.         }
  62.     ]
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement