Elastic Search (5.0) 过滤器上下文术语查询不起作用

Elastic Search (5.0) filter context term query is not working

我有一个过滤器查询,如下所示。我打算过滤无效的 stripped-blocked-uri(完全匹配),

{
    "query": {
        "bool": {
            "filter": [
                {
                    "term": {
                        "stripped-blocked-uri": "https://www.twitter.com:9090"
                    }
                },
                {
                    "term": {
                        "project-id": "1"
                    }
                },
                {
                    "term": {
                        "rule-id": "101"
                    }
                }
            ]
        }
    }
}

没有返回匹配。

我的映射是,

                    "stripped-blocked-uri": {
                        "type": "text",
                        "fields": {
                            "keyword": {
                                "type": "keyword",
                                "ignore_above": 256
                            }
                        }
                    },

不确定这里出了什么问题。请帮忙!

使用keyword字段:

{
    "query": {
        "bool": {
            "filter": [
                {
                    "term": {
                        "stripped-blocked-uri.keyword": "https://www.twitter.com:9090"
                    }
                },
                {
                    "term": {
                        "project-id": "1"
                    }
                },
                {
                    "term": {
                        "rule-id": "101"
                    }
                }
            ]
        }
    }
}