//
PUT /users
{
    "mappings": {
        "properties": {
            "city": {
                "type": "keyword"
            }}}
}

POST /users/_doc/User1
{
    "username": "admin",
    "age": 20,
    "ip": "192.168.0.0",
    "city": "Tehran"
}

POST /users/_doc/User2
{
    "username": "Ali",
    "age": 45,
    "ip": "162.148.0.0",
    "city": "qom"
}
POST /users/_doc/User3
{
    "username": "reza",
    "age": 12,
    "ip": "112.178.104.0",
    "city": "Tehran"
}

// میخواهیم ببینیم بیشترین تعداد شهر در کاربرانمان چیست

POST /users/_search
{
    "aggs": {
        "Tehraniha": {
            "terms": {
                "field": "city",
                "size": 1
            }
        }
    }
}
