Validation Failed: 1: mapping type is missing; in elasticsearch

You have two solutions:

A. If you want to run

$ cat mapping.json | http PUT myhost:9200/acastest/articles/_mapping 

You need to change your mapping.json file like this:

    { 
        "articles": {
            "properties": {
                "category_en": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "category_fa": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                blah
                blah
                blah
            }
        }
    }

B. Or you can keep your mapping.json file like it is now, but then you need to run the following command instead:

$ cat mapping.json | http PUT myhost:9200/acastest