Update all ES queries to use Elasticsearch DSL (bug 1036168)

seems to me that you can just have a dict:

    data_map = [
      ("tags", "tags"),
      ("languages", "supported_locales"),
    ]
    
    for data_key, field in data_map:
        d = data.get(data_key) 
        if d:
          qs = qs.filter('terms' if insinstance(d, (list, tuple)) else 'term', **{field: d})

or equivalent. Seems easier to read/adapt than a bunch of ifs...