@@ -56,7 +56,7 @@ public class CommonValue {
5656 public static final String ML_MODEL_INDEX = ".plugins-ml-model" ;
5757 public static final String ML_TASK_INDEX = ".plugins-ml-task" ;
5858 public static final Integer ML_MODEL_GROUP_INDEX_SCHEMA_VERSION = 2 ;
59- public static final Integer ML_MODEL_INDEX_SCHEMA_VERSION = 10 ;
59+ public static final Integer ML_MODEL_INDEX_SCHEMA_VERSION = 11 ;
6060 public static final String ML_CONNECTOR_INDEX = ".plugins-ml-connector" ;
6161 public static final Integer ML_TASK_INDEX_SCHEMA_VERSION = 2 ;
6262 public static final Integer ML_CONNECTOR_SCHEMA_VERSION = 3 ;
@@ -82,59 +82,56 @@ public class CommonValue {
8282 + " \" custom_attribute_names\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" }}}\n "
8383 + " }\n "
8484 + " }\n " ;
85- public static final String ML_MODEL_GROUP_INDEX_MAPPING = "{\n " +
86- " \" _meta\" : {\n " +
87- " \" schema_version\" : " + ML_MODEL_GROUP_INDEX_SCHEMA_VERSION + "\n " +
88- " },\n " +
89- " \" properties\" : {\n " +
90- " \" " + MLModelGroup .MODEL_GROUP_NAME_FIELD + "\" : {\n " +
91- " \" type\" : \" text\" ,\n " +
92- " \" fields\" : {\n " +
93- " \" keyword\" : {\n " +
94- " \" type\" : \" keyword\" ,\n " +
95- " \" ignore_above\" : 256\n " +
96- " }\n " +
97- " }\n " +
98- " },\n " +
99- " \" " + MLModelGroup .DESCRIPTION_FIELD + "\" : {\n " +
100- " \" type\" : \" text\" \n " +
101- " },\n " +
102- " \" " + MLModelGroup .LATEST_VERSION_FIELD + "\" : {\n " +
103- " \" type\" : \" integer\" \n " +
104- " },\n " +
105- " \" " + MLModelGroup .MODEL_GROUP_ID_FIELD + "\" : {\n " +
106- " \" type\" : \" keyword\" \n " +
107- " },\n " +
108- " \" " + MLModelGroup .BACKEND_ROLES_FIELD + "\" : {\n " +
109- " \" type\" : \" text\" ,\n " +
110- " \" fields\" : {\n " +
111- " \" keyword\" : {\n " +
112- " \" type\" : \" keyword\" ,\n " +
113- " \" ignore_above\" : 256\n " +
114- " }\n " +
115- " }\n " +
116- " },\n " +
117- " \" " + MLModelGroup .ACCESS + "\" : {\n " +
118- " \" type\" : \" keyword\" \n " +
119- " },\n " +
120- " \" " + MLModelGroup .OWNER + "\" : {\n " +
121- " \" type\" : \" nested\" ,\n " +
122- " \" properties\" : {\n " +
123- " \" name\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" , \" ignore_above\" :256}}},\n "
124- +
125- " \" backend_roles\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" }}},\n "
126- +
127- " \" roles\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" }}},\n " +
128- " \" custom_attribute_names\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" }}}\n "
129- +
130- " }\n " +
131- " },\n " +
132- " \" " + MLModelGroup .CREATED_TIME_FIELD + "\" : {\n " +
133- " \" type\" : \" date\" , \" format\" : \" strict_date_time||epoch_millis\" },\n " +
134- " \" " + MLModelGroup .LAST_UPDATED_TIME_FIELD + "\" : {\n " +
135- " \" type\" : \" date\" , \" format\" : \" strict_date_time||epoch_millis\" }\n " +
136- " }\n " +
137- "}" ;
85+ public static final String ML_MODEL_GROUP_INDEX_MAPPING = "{\n "
86+ + " \" _meta\" : {\n "
87+ + " \" schema_version\" : " + ML_MODEL_GROUP_INDEX_SCHEMA_VERSION + "\n "
88+ + " },\n "
89+ + " \" properties\" : {\n "
90+ + " \" " + MLModelGroup .MODEL_GROUP_NAME_FIELD + "\" : {\n "
91+ + " \" type\" : \" text\" ,\n "
92+ + " \" fields\" : {\n "
93+ + " \" keyword\" : {\n "
94+ + " \" type\" : \" keyword\" ,\n "
95+ + " \" ignore_above\" : 256\n "
96+ + " }\n "
97+ + " }\n "
98+ + " },\n "
99+ + " \" " + MLModelGroup .DESCRIPTION_FIELD + "\" : {\n "
100+ + " \" type\" : \" text\" \n "
101+ + " },\n "
102+ + " \" " + MLModelGroup .LATEST_VERSION_FIELD + "\" : {\n "
103+ + " \" type\" : \" integer\" \n "
104+ + " },\n "
105+ + " \" " + MLModelGroup .MODEL_GROUP_ID_FIELD + "\" : {\n "
106+ + " \" type\" : \" keyword\" \n "
107+ + " },\n "
108+ + " \" " + MLModelGroup .BACKEND_ROLES_FIELD + "\" : {\n "
109+ + " \" type\" : \" text\" ,\n "
110+ + " \" fields\" : {\n "
111+ + " \" keyword\" : {\n "
112+ + " \" type\" : \" keyword\" ,\n "
113+ + " \" ignore_above\" : 256\n "
114+ + " }\n "
115+ + " }\n "
116+ + " },\n "
117+ + " \" " + MLModelGroup .ACCESS + "\" : {\n "
118+ + " \" type\" : \" keyword\" \n "
119+ + " },\n "
120+ + " \" " + MLModelGroup .OWNER + "\" : {\n "
121+ + " \" type\" : \" nested\" ,\n "
122+ + " \" properties\" : {\n "
123+ + " \" name\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" , \" ignore_above\" :256}}},\n "
124+ + " \" backend_roles\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" }}},\n "
125+ + " \" roles\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" }}},\n "
126+ + " \" custom_attribute_names\" : {\" type\" :\" text\" , \" fields\" :{\" keyword\" :{\" type\" :\" keyword\" }}}\n "
127+ + " }\n "
128+ + " },\n "
129+ + " \" " + MLModelGroup .CREATED_TIME_FIELD + "\" : {\n "
130+ + " \" type\" : \" date\" , \" format\" : \" strict_date_time||epoch_millis\" },\n "
131+ + " \" " + MLModelGroup .LAST_UPDATED_TIME_FIELD + "\" : {\n "
132+ + " \" type\" : \" date\" , \" format\" : \" strict_date_time||epoch_millis\" }\n "
133+ + " }\n "
134+ + "}" ;
138135
139136 public static final String ML_CONNECTOR_INDEX_FIELDS = " \" properties\" : {\n "
140137 + " \" "
@@ -265,45 +262,48 @@ public class CommonValue {
265262 + MLModel .LAST_UNDEPLOYED_TIME_FIELD
266263 + "\" : {\" type\" : \" date\" , \" format\" : \" strict_date_time||epoch_millis\" },\n "
267264 + " \" "
265+ + MLModel .INTERFACE_FIELD
266+ + "\" : {\" type\" : \" flat_object\" },\n "
267+ + " \" "
268268 + MLModel .GUARDRAILS_FIELD
269- + "\" : {\n " +
270- " \" properties\" : {\n " +
271- " \" input_guardrail\" : {\n " +
272- " \" properties\" : {\n " +
273- " \" regex\" : {\n " +
274- " \" type\" : \" text\" \n " +
275- " },\n " +
276- " \" stop_words\" : {\n " +
277- " \" properties\" : {\n " +
278- " \" index_name\" : {\n " +
279- " \" type\" : \" text\" \n " +
280- " },\n " +
281- " \" source_fields\" : {\n " +
282- " \" type\" : \" text\" \n " +
283- " }\n " +
284- " }\n " +
285- " }\n " +
286- " }\n " +
287- " },\n " +
288- " \" output_guardrail\" : {\n " +
289- " \" properties\" : {\n " +
290- " \" regex\" : {\n " +
291- " \" type\" : \" text\" \n " +
292- " },\n " +
293- " \" stop_words\" : {\n " +
294- " \" properties\" : {\n " +
295- " \" index_name\" : {\n " +
296- " \" type\" : \" text\" \n " +
297- " },\n " +
298- " \" source_fields\" : {\n " +
299- " \" type\" : \" text\" \n " +
300- " }\n " +
301- " }\n " +
302- " }\n " +
303- " }\n " +
304- " }\n " +
305- " }\n " +
306- " },\n "
269+ + "\" : {\n "
270+ + " \" properties\" : {\n "
271+ + " \" input_guardrail\" : {\n "
272+ + " \" properties\" : {\n "
273+ + " \" regex\" : {\n "
274+ + " \" type\" : \" text\" \n "
275+ + " },\n "
276+ + " \" stop_words\" : {\n "
277+ + " \" properties\" : {\n "
278+ + " \" index_name\" : {\n "
279+ + " \" type\" : \" text\" \n "
280+ + " },\n "
281+ + " \" source_fields\" : {\n "
282+ + " \" type\" : \" text\" \n "
283+ + " }\n "
284+ + " }\n "
285+ + " }\n "
286+ + " }\n "
287+ + " },\n "
288+ + " \" output_guardrail\" : {\n "
289+ + " \" properties\" : {\n "
290+ + " \" regex\" : {\n "
291+ + " \" type\" : \" text\" \n "
292+ + " },\n "
293+ + " \" stop_words\" : {\n "
294+ + " \" properties\" : {\n "
295+ + " \" index_name\" : {\n "
296+ + " \" type\" : \" text\" \n "
297+ + " },\n "
298+ + " \" source_fields\" : {\n "
299+ + " \" type\" : \" text\" \n "
300+ + " }\n "
301+ + " }\n "
302+ + " }\n "
303+ + " }\n "
304+ + " }\n "
305+ + " }\n "
306+ + " },\n "
307307 + " \" "
308308 + MLModel .CONNECTOR_FIELD
309309 + "\" : {" + ML_CONNECTOR_INDEX_FIELDS + " }\n },"
0 commit comments