James Work account
James Work account

Reputation: 43

How to create Nested field in index using Elasticsearch Java Client 8

I have an ES index that is created from Java code level when I index a POJO with ElasticsearchClient.

How do I specify that I need certain fields to be type: "nested" in my index?

Upvotes: 1

Views: 116

Answers (1)

fabio petry
fabio petry

Reputation: 11

You can specify your nested attribute with annotation @Field:

@Field(type = FieldType.Nested)

Upvotes: 0

Related Questions