Elasticsearch Java Mapping Builder

Hello guys,

I come here to try to contribute to the open source community.

I looked for a way to generate the mappings to use before indexing without typing json files. I wanted something I do not need to worry about the model of my entities used with java rest client.

So I created a project focused on that, using java annotations.
If anyone wants to download, test or contribute, please feel free to use.

here is the repository in github.

The artifacts is already published in the central maven.


Example usage:

MappingBuilder mappingBuilder;

public String getMapping() {
    return mappingBuilder.build(BookEntity.class).getContentAsString();


public class BookEntity {

    private String isbn;

    private String name;

    private String description;

    private OffsetDateTime releaseDate;

    private Boolean active;

    private String imageBlob;

    private AuthorEntity author;

@ElasticDocument(value = "author")
public class AuthorEntity {

    private Long id;

    private String name;

    private String artisticName;

Thank you.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.