Skip to content

Commit 790e684

Browse files
create model/task index with correct mapping (#284) (#286)
Signed-off-by: Yaliang Wu <[email protected]> (cherry picked from commit 0bae134) Co-authored-by: Yaliang Wu <[email protected]>
1 parent 972228d commit 790e684

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public void initMLIndexIfAbsent(String indexName, String mapping, ActionListener
100100
log.error("Failed to create index " + indexName, e);
101101
listener.onFailure(e);
102102
});
103-
CreateIndexRequest request = new CreateIndexRequest(indexName);
103+
CreateIndexRequest request = new CreateIndexRequest(indexName).mapping(mapping);
104104
client.admin().indices().create(request, ActionListener.runBefore(actionListener, () -> threadContext.restore()));
105105
} catch (Exception e) {
106106
log.error("Failed to init index " + indexName, e);

0 commit comments

Comments
 (0)