خرید بک لینک

Vote count: 0

I am trying to implement a GROUP BY categories_slug, WHERE location_country = 'CA' and location_province = 'ON' in ElasticSearch

{
  "aggs": {
    "categories": {
      "terms": {
        "field": "categories.slug",
        "order": {
          "_term": "asc"
        },
        "size": 1000
      }
    }
  },
  "query": {
    "filtered": {
      "filter": [
        {
          "term": {
            "locations.country": "CA"
          }
        },
        {
          "term": {
            "locations.administrative_area_level_1": "QC"
          }
        }
      ]
    }
  }
}

How can I use elastica to achieve this query?

asked 4 mins ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 16 فروردين 1395 ساعت: 1:02

صفحه بندی