core icon indicating copy to clipboard operation
core copied to clipboard

Add support to ES queries that contain tags

Open nollymar opened this issue 8 years ago • 3 comments

With the ES upgrade this queries must be supported:

{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "contenttype": "news"
          }
        },
        {
          "term": {
            "categories": "investing"
          }
        },
        {
          "term": {
            "news.tags": "gas"
          }
        },
        {
          "term": {
            "news.byline": "jean"
          }
        }
      ]
    }
  }
}

and

{
       "query": {
          "query_string": {
             "query": "+contenttype:news"
          }
       },
       "aggs" : {
          "tag" : {
             "terms" : {
                "field": "tags",
                "size" : 20
             }
          }
       },
       "size":0
}

nollymar avatar Feb 28 '18 20:02 nollymar

PR Core: https://github.com/dotCMS/core/pull/13750

nollymar avatar Feb 28 '18 21:02 nollymar

Nolly, please make sure we support tags with spaces in their names, e.g.

https://dotcms.com/codeshare/index.dot?tag=frontend+development

wezell avatar Mar 01 '18 13:03 wezell

Waiting for https://github.com/dotCMS/core/issues/13797

shaydotcms avatar Mar 06 '18 18:03 shaydotcms