elasticsearch-java icon indicating copy to clipboard operation
elasticsearch-java copied to clipboard

IndexSettings.Builder does not have "mapping" option, only "mappings" which is wrong

Open Enerccio opened this issue 3 years ago • 1 comments

Java API client version

8.2.3

Java version

1.8

Elasticsearch Version

8.2.3

Problem description

When creating index I want to specify index.mapping.total_fields.limit but there is no option to do that. Only thing I can do is this:

.index(i -> i
            .mappings(l -> l
                    .totalFields(t -> t
                            .limit(2000))))

which ends with error: "unknown setting [index.mappings.total_fields.limit] did you mean any of [index.mapping.total_fields.limit, index.mapping.nested_fields.limit, index.mapping.dimension_fields.limit]?

Enerccio avatar Jul 16 '22 08:07 Enerccio

Issue is there in 8.3.3 too

ehabinl avatar Aug 09 '22 13:08 ehabinl

Please update on this ?

RaviPonduru avatar Mar 17 '23 18:03 RaviPonduru

I am not sure why it takes ages to simple fix a typo in one source file

Enerccio avatar Mar 17 '23 21:03 Enerccio

Hello and sorry for the long wait. index.mapping.total_fields.limit in the java client can be set by using the settings field when creating an index, for example:

 esClient.indices().create(c -> c
        .index("test")
            .settings(st -> st
                .mapping(m -> m.totalFields(t -> t.limit(1)))));

This was probably fixed at some point, now mappings under index is a different property.

l-trotta avatar Feb 21 '24 12:02 l-trotta