Issues with new search query

Hi i have recently been busy reworking our old and outdated ES now um running 8.4 and im trying to create a similar query to what i had in the old one. But i have a hard time finding examples or the right documentation

This is an example what we had:

{
  "index": "vehicles",
  "type": "vehicle",
  "body": {
    "from": "0",
    "size": 30,
    "query": {
      "filtered": {
        "query": { "match_all": [] },
        "filter": {
          "bool": {
            "must": [
              {
                "bool": {
                  "should": [
                    [
                      { "term": { "make.untouched": "IVECO" } },
                      { "term": { "make.untouched": "VOLKSWAGEN" } }
                    ]
                  ]
                }
              },
              {
                "bool": {
                  "should": [[{ "term": { "type_serie.untouched": "DAILY" } }]]
                }
              },
              {
                "bool": {
                  "should": [[{ "term": { "filters.header.camper": "true" } }]]
                }
              },
              { "range": { "days_sold": { "gte": 0, "lt": 2 } } },
              { "range": { "days_on_stock": { "gte": 3 } } },
              { "range": { "price": { "gt": 0 } } },
              { "range": { "price_trader": { "gt": 0 } } },
              { "term": { "show_in_search": true } }
            ],
            "must_not": [
              { "term": { "offer_code": "z" } },
              { "term": { "stockingtype": "a" } },
              { "term": { "stockingtype": "v" } },
              { "term": { "stockingtype": "z" } },
              { "term": { "stockingtype": "p" } }
            ]
          }
        }
      }
    },
    "sort": [
      { "_score": "desc" },
      { "days_on_stock": "asc" },
      { "price": "asc" }
    ]
  }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.