Skip to content

Commit

Permalink
create model/task index with correct mapping (#284)
Browse files Browse the repository at this point in the history
Signed-off-by: Yaliang Wu <ylwu@amazon.com>
(cherry picked from commit 0bae134)
  • Loading branch information
ylwu-amzn authored and github-actions[bot] committed Apr 18, 2022
1 parent 972228d commit 86e8647
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void initMLIndexIfAbsent(String indexName, String mapping, ActionListener
log.error("Failed to create index " + indexName, e);
listener.onFailure(e);
});
CreateIndexRequest request = new CreateIndexRequest(indexName);
CreateIndexRequest request = new CreateIndexRequest(indexName).mapping(mapping);
client.admin().indices().create(request, ActionListener.runBefore(actionListener, () -> threadContext.restore()));
} catch (Exception e) {
log.error("Failed to init index " + indexName, e);
Expand Down

0 comments on commit 86e8647

Please sign in to comment.