5
5
6
6
package org .opensearch .ml .plugin ;
7
7
8
+ import static org .opensearch .ml .common .CommonValue .ML_AGENT_INDEX ;
8
9
import static org .opensearch .ml .common .CommonValue .ML_CONFIG_INDEX ;
9
10
import static org .opensearch .ml .common .CommonValue .ML_CONNECTOR_INDEX ;
10
11
import static org .opensearch .ml .common .CommonValue .ML_CONTROLLER_INDEX ;
12
+ import static org .opensearch .ml .common .CommonValue .ML_MEMORY_MESSAGE_INDEX ;
13
+ import static org .opensearch .ml .common .CommonValue .ML_MEMORY_META_INDEX ;
14
+ import static org .opensearch .ml .common .CommonValue .ML_MODEL_GROUP_INDEX ;
11
15
import static org .opensearch .ml .common .CommonValue .ML_MODEL_INDEX ;
16
+ import static org .opensearch .ml .common .CommonValue .ML_STOP_WORDS_INDEX ;
12
17
import static org .opensearch .ml .common .CommonValue .ML_TASK_INDEX ;
13
18
14
19
import java .nio .file .Path ;
38
43
import org .opensearch .core .xcontent .NamedXContentRegistry ;
39
44
import org .opensearch .env .Environment ;
40
45
import org .opensearch .env .NodeEnvironment ;
46
+ import org .opensearch .indices .SystemIndexDescriptor ;
41
47
import org .opensearch .ml .action .agents .DeleteAgentTransportAction ;
42
48
import org .opensearch .ml .action .agents .GetAgentTransportAction ;
43
49
import org .opensearch .ml .action .agents .TransportRegisterAgentAction ;
284
290
import org .opensearch .plugins .Plugin ;
285
291
import org .opensearch .plugins .SearchPipelinePlugin ;
286
292
import org .opensearch .plugins .SearchPlugin ;
293
+ import org .opensearch .plugins .SystemIndexPlugin ;
287
294
import org .opensearch .repositories .RepositoriesService ;
288
295
import org .opensearch .rest .RestController ;
289
296
import org .opensearch .rest .RestHandler ;
@@ -310,7 +317,8 @@ public class MachineLearningPlugin extends Plugin
310
317
SearchPlugin ,
311
318
SearchPipelinePlugin ,
312
319
ExtensiblePlugin ,
313
- IngestPlugin {
320
+ IngestPlugin ,
321
+ SystemIndexPlugin {
314
322
public static final String ML_THREAD_POOL_PREFIX = "thread_pool.ml_commons." ;
315
323
public static final String GENERAL_THREAD_POOL = "opensearch_ml_general" ;
316
324
public static final String EXECUTE_THREAD_POOL = "opensearch_ml_execute" ;
@@ -1017,4 +1025,20 @@ public Map<String, org.opensearch.ingest.Processor.Factory> getProcessors(org.op
1017
1025
);
1018
1026
return Collections .unmodifiableMap (processors );
1019
1027
}
1028
+
1029
+ @ Override
1030
+ public Collection <SystemIndexDescriptor > getSystemIndexDescriptors (Settings settings ) {
1031
+ List <SystemIndexDescriptor > systemIndexDescriptors = new ArrayList <>();
1032
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_AGENT_INDEX , "ML Commons Agent Index" ));
1033
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_CONFIG_INDEX , "ML Commons Configuration Index" ));
1034
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_CONNECTOR_INDEX , "ML Commons Connector Index" ));
1035
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_CONTROLLER_INDEX , "ML Commons Controller Index" ));
1036
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_MODEL_GROUP_INDEX , "ML Commons Model Group Index" ));
1037
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_MODEL_INDEX , "ML Commons Model Index" ));
1038
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_TASK_INDEX , "ML Commons Task Index" ));
1039
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_MEMORY_META_INDEX , "ML Commons Memory Meta Index" ));
1040
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_MEMORY_MESSAGE_INDEX , "ML Commons Memory Message Index" ));
1041
+ systemIndexDescriptors .add (new SystemIndexDescriptor (ML_STOP_WORDS_INDEX , "ML Commons Stop Words Index" ));
1042
+ return systemIndexDescriptors ;
1043
+ }
1020
1044
}
0 commit comments