既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
代码如下(示例):
POST /test/_update_by_query
{
"script": {
"source": "ctx._source.k_VENDORID = params.newValue; if (!ctx._source.containsKey('t_CLEANTIME')) {def dateFormat = new SimpleDateFormat('yyyy-MM-dd HH:mm:ss'); ctx._source.t_CLEANTIME = dateFormat.format(new Date()) ; }",
"lang": "painless",
"params": {
"newValue": "6666666666666666666666666666666666"
}
},
"query": {
"term": {
"_id": {
"value": "bg8lgooBm62Q6jNaiSK4"
}
}
}
}
POST test/_update_by_query
{
"query": {
"term": {
"_id": "bg8lgooBm62Q6jNaiSK4"
}
},
"script": {
"source": "ctx._source.remove('t_CLEANTIME')"
}
}
GET test/_doc/bg8lgooBm62Q6jNaiSK4
```es
POST /test/_delete_by_query
{
"query": {
"bool": {
"must": [
{
"term": {
"NAME": {
"value": "HB"
}
}
}
]
}
}
}
2.对应api
代码如下(示例):
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.common.xcontent.XContentType;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class UpdateDateFieldExample {
public static void main(String[] args) throws IOException {
// 创建RestHighLevelClient实例
RestHighLevelClient client = new RestHighLevelClient(
RestClient.builder(new HttpHost("localhost", 9200, "http")));
// 构建UpdateRequest
UpdateRequest request = new UpdateRequest("your\_index", "your\_document\_id");
![img](https://img-blog.csdnimg.cn/img_convert/e54f6452ede7662ea4355cbb9aa2de50.png)
![img](https://img-blog.csdnimg.cn/img_convert/e9cffd29e274e77c51e6a3a15fe70b62.png)
![img](https://img-blog.csdnimg.cn/img_convert/0c6d4a7b22ca2960a779f4fef35e2dc7.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上大数据知识点,真正体系化!**
**由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新**
**[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/forums/4f45ff00ff254613a03fab5e56a57acb)**
纲路线、讲解视频,并且后续会持续更新**
**[需要这份系统化资料的朋友,可以戳这里获取](https://bbs.csdn.net/forums/4f45ff00ff254613a03fab5e56a57acb)**