Skip to content

Instantly share code, notes, and snippets.

@atesibrahim
Created July 16, 2022 09:59
Show Gist options
  • Save atesibrahim/6abf0a5385ea88e8e2666f2d1a4f417e to your computer and use it in GitHub Desktop.
Save atesibrahim/6abf0a5385ea88e8e2666f2d1a4f417e to your computer and use it in GitHub Desktop.
@Getter
@Setter
@RequiredArgsConstructor
@AllArgsConstructor
@Builder
@Document(indexName = "book")
public class Book {
@Id
private String id;
@MultiField(mainField = @Field(type = Text, fielddata = true), otherFields = { @InnerField(suffix = "verbatim", type = Keyword) })
private String title;
@Field(type = Nested, includeInParent = true)
private Author author;
@Field(type = Keyword)
private String[] tags;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment