PUT /website/_doc/1 { "post_date": "2019-01-01", "title": "my first article", "content": "this is my first article in this website", "author_id": 11400 }
PUT /website/_doc/2 { "post_date": "2019-01-02", "title": "my second article", "content": "this is my second article in this website", "author_id": 11400 } PUT /website/_doc/3 { "post_date": "2019-01-03", "title": "my third article", "content": "this is my third article in this website", "author_id": 11400 }
GET /website/_search?q=2019 0条结果 GET /website/_search?q=2019-01-01 1条结果 GET /website/_search?q=post_date:2019-01-01 1条结果 GET /website/_search?q=post_date:2019 0 条结果
PUT /book/_doc/1 { "name":"Bootstrap开发框架", "description":"Bootstrap是由Twitter推出的一个前台页面开发框架,在行业之中使用较为广泛。此开发框架包含了大量的CSS、JS程序代码,可以帮助开发者(尤其是不擅长页面开发的程序人员)轻松的实现一个不受浏览器限制的精美界面效果。", "pic":"group1/M00/00/01/wKhlQFqO4MmAOP53AAAcwDwm6SU490.jpg", "studymodel":"201002" }
搜索测试:
1 2 3
GET /book/_search?q=name:"开发" GET /book/_search?q=description:"开发" GET /book/_search?q=pic:"group1/M00/00/01/wKhlQFqO4MmAOP53AAAcwDwm6SU490.jpg" # 搜索不到数据