本文基于ES6.4版本,我也是出于学习阶段,对学习内容做个记录,如果文中有错误,请指出。

实验数据:

index:book

type:novel

mappings:

{
    "mappings": {
        "novel": {
            "dynamic": "false",
            "properties": {
                "word_count": {
                    "type": "integer"
                },
                "author": {
                    "type": "keyword"
                },
                "title": {
                    "type": "text"
                },
                "publish_date": {
                    "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis",
                    "type": "date"
                }
            }
        }
    }
}
View Code

相关文章: