-
Notifications
You must be signed in to change notification settings - Fork 269
Closed
Labels
Area: DocumentationImprovements or additions to documentationImprovements or additions to documentationCategory: EnhancementNew feature or requestNew feature or requestCategory: QuestionNot an issue but a question. May lead to enhancing docsNot an issue but a question. May lead to enhancing docs
Description
Hello and I have a question:
I am trying out this new fluent client and have a bunch of projects that I wanted to migrate from the RHLC to the new API client. Now I am kinda stuck on an inconvenient spot, creating an index with settings and mapping. the builder and functional pattern are nice, though in our projects we put json-files for mappings and settings which are read and converted into an object/xContentBuilder so we do not have to implement complex settings/mappings into java code (and reuse without copy paste).
kinda like that
CreateIndexRequest createIndexRequest = new CreateIndexRequest(indexName)
.settings(this.elasticsearchIndexService.createSettings(ELASTICSEARCH_INDEX_SETTINGS_FILE))
.mapping(this.elasticsearchIndexService.createMapping(ELASTICSEARCH_INDEX_MAPPING_FILE,
ELASTICSEARCH_INDEX_MAPPING_FOLDER, shop));
AcknowledgedResponse indexCreateResponse = this.restHighLevelClient.indices().create(createIndexRequest, RequestOptions.DEFAULT);
depending on the shop
parameter different mappings are loaded.
Is there a similar and fluent way doing that in the new client or are there any plans supporting json/xcontent?
sothawo, anton-filatov, SonoAlien, maciejharczuk, sulaukad and 9 more
Metadata
Metadata
Assignees
Labels
Area: DocumentationImprovements or additions to documentationImprovements or additions to documentationCategory: EnhancementNew feature or requestNew feature or requestCategory: QuestionNot an issue but a question. May lead to enhancing docsNot an issue but a question. May lead to enhancing docs