Guest User

Untitled

a guest
Sep 7th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.02 KB | None | 0 0
  1. {
  2.   "query": {
  3.     "constant_score":{
  4.       "filter":{
  5.         "bool": {
  6.           "must": [
  7.             {"term": {"ad_type": "sell"} },
  8.             {"term": {"category_slug": "syire"} },
  9.             {
  10.               "nested": {
  11.                 "path": "classification",
  12.  
  13.                 "query": {
  14.                   "bool": {
  15.                     "must": [
  16.                        {"bool":{
  17.                              "should":[
  18.                                 {"bool":{
  19.                                       "must":[
  20.                                          {"term":{"classification.category_id":6}},
  21.                                          {"term":{"classification.filters_slugs":"granula"}}
  22.                                       ]
  23.                                    }
  24.                                 }
  25.                              ]
  26.                           }
  27.                        },
  28.  
  29.                        {"bool":{
  30.                              "should":[
  31.                                 {
  32.                                    "bool":{
  33.                                       "must":[
  34.                                          {"term":{"classification.category_id":7 }},
  35.                                          {"term":{"classification.filters_slugs":"chernyij" }}
  36.                                       ]
  37.                                    }
  38.                                 },
  39.                                 {
  40.                                    "bool":{
  41.                                       "must":[
  42.                                          {"term":{"classification.category_id":7}},
  43.                                          {"term":{"classification.filters_slugs": "belyij"}}
  44.                                       ]
  45.                                    }
  46.                                 }
  47.                              ]
  48.                           }
  49.                        }
  50.                 ]
  51.                   }
  52.                 }
  53.               }
  54.             }
  55.           ]
  56.         }
  57.       }
  58.     }
  59.   }
  60. }
Add Comment
Please, Sign In to add comment