Spring Boot and Elasticsearch — Update Documents with Scripting

Photo by engin akyurt on Unsplash

Elasticsearch Scripting and Painless:

You can use a script to calculate values (a custom score, etc.) over fields and return this value. The default language for scripting in ES is Painless (with a syntax similar to Java) and it was built for ES (you can also use different languages for scripts with their specific plugins). The scripts written with Painless are compiled directly into Java Virtual Machine (JVM) byte code and executed against a standard JVM.

ElasticSearch Guide

Spring Boot Implementation

Now, I will share my implementation in my Spring Boot project.

@Getter
@Setter
@AllArgsConstructor
public class BulkProcessMailItemsResponse {

private Long totalDocs;

private Long durationInMiliseconds;
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nil Seri

I would love to change the world, but they won’t give me the source code | coding 👩🏼‍💻 | coffee ☕️ | jazz 🎷 | anime 🐲 | books 📚 | drawing 🎨