File tree Expand file tree Collapse file tree 9 files changed +99
-113
lines changed
src/main/resources/substitutionTemplates Expand file tree Collapse file tree 9 files changed +99
-113
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
77### Features
88### Enhancements
99### Bug Fixes
10+ - Fix substitution templates for OpenSearch 3.x compatibility by removing ` _doc ` mapping ([ #1301 ] ( https://github.com/opensearch-project/flow-framework/pull/1301 ) )
11+
1012### Infrastructure
1113### Documentation
1214### Maintenance
Original file line number Diff line number Diff line change 4848 "index.search.default_pipeline" : " ${{create_search_pipeline.pipeline_id}}"
4949 },
5050 "mappings" : {
51- "_doc" : {
52- "properties" : {
53- "${{text_embedding.field_map.output}}" : {
54- "type" : " knn_vector" ,
55- "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
56- "method" : {
57- "engine" : " ${{create_index.mappings.method.engine}}" ,
58- "space_type" : " ${{create_index.mappings.method.space_type}}" ,
59- "name" : " ${{create_index.mappings.method.name}}" ,
60- "parameters" : {}
61- }
62- },
63- "${{text_embedding.field_map.input}}" : {
64- "type" : " text"
51+ "properties" : {
52+ "${{text_embedding.field_map.output}}" : {
53+ "type" : " knn_vector" ,
54+ "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
55+ "method" : {
56+ "engine" : " ${{create_index.mappings.method.engine}}" ,
57+ "space_type" : " ${{create_index.mappings.method.space_type}}" ,
58+ "name" : " ${{create_index.mappings.method.name}}" ,
59+ "parameters" : {}
6560 }
61+ },
62+ "${{text_embedding.field_map.input}}" : {
63+ "type" : " text"
6664 }
6765 }
6866 }
Original file line number Diff line number Diff line change 4949 "number_of_shards" : " ${{create_index.settings.number_of_shards}}"
5050 },
5151 "mappings" : {
52- "_doc" : {
53- "properties" : {
54- "${{text_image_embedding.embedding}}" : {
55- "type" : " knn_vector" ,
56- "dimension" : " ${{text_image_embedding.field_map.output.dimension}}" ,
57- "method" : {
58- "engine" : " ${{create_index.mappings.method.engine}}" ,
59- "name" : " ${{create_index.mappings.method.name}}" ,
60- "parameters" : {}
61- }
62- },
63- "${{text_image_embedding.field_map.text}}" : {
64- "type" : " ${{text_image_embedding.field_map.text.type}}"
65- },
66- "${{text_image_embedding.field_map.image}}" : {
67- "type" : " ${{text_image_embedding.field_map.image.type}}"
52+ "properties" : {
53+ "${{text_image_embedding.embedding}}" : {
54+ "type" : " knn_vector" ,
55+ "dimension" : " ${{text_image_embedding.field_map.output.dimension}}" ,
56+ "method" : {
57+ "engine" : " ${{create_index.mappings.method.engine}}" ,
58+ "name" : " ${{create_index.mappings.method.name}}" ,
59+ "parameters" : {}
6860 }
61+ },
62+ "${{text_image_embedding.field_map.text}}" : {
63+ "type" : " ${{text_image_embedding.field_map.text.type}}"
64+ },
65+ "${{text_image_embedding.field_map.image}}" : {
66+ "type" : " ${{text_image_embedding.field_map.image.type}}"
6967 }
7068 }
7169 }
Original file line number Diff line number Diff line change 5656 "name" : " ${{register_remote_model.name}}" ,
5757 "function_name" : " remote" ,
5858 "description" : " ${{register_remote_model.description}}" ,
59- "deploy" : true
59+ "deploy" : true
6060 }
6161 },
6262 {
9999 "number_of_shards" : " ${{create_index.settings.number_of_shards}}"
100100 },
101101 "mappings" : {
102- "_doc" : {
103- "properties" : {
104- "${{text_image_embedding.embedding}}" : {
105- "type" : " knn_vector" ,
106- "dimension" : " ${{text_image_embedding.field_map.output.dimension}}" ,
107- "method" : {
108- "engine" : " ${{create_index.mappings.method.engine}}" ,
109- "name" : " ${{create_index.mappings.method.name}}" ,
110- "parameters" : {}
111- }
112- },
113- "${{text_image_embedding.field_map.text}}" : {
114- "type" : " ${{text_image_embedding.field_map.text.type}}"
115- },
116- "${{text_image_embedding.field_map.image}}" : {
117- "type" : " ${{text_image_embedding.field_map.image.type}}"
102+ "properties" : {
103+ "${{text_image_embedding.embedding}}" : {
104+ "type" : " knn_vector" ,
105+ "dimension" : " ${{text_image_embedding.field_map.output.dimension}}" ,
106+ "method" : {
107+ "engine" : " ${{create_index.mappings.method.engine}}" ,
108+ "name" : " ${{create_index.mappings.method.name}}" ,
109+ "parameters" : {}
118110 }
111+ },
112+ "${{text_image_embedding.field_map.text}}" : {
113+ "type" : " ${{text_image_embedding.field_map.text.type}}"
114+ },
115+ "${{text_image_embedding.field_map.image}}" : {
116+ "type" : " ${{text_image_embedding.field_map.image.type}}"
119117 }
120118 }
121119 }
Original file line number Diff line number Diff line change 5959 "default_pipeline" : " ${{create_ingest_pipeline.pipeline_id}}"
6060 },
6161 "mappings" : {
62- "_doc" : {
63- "properties" : {
64- "${{create_ingest_pipeline.text_embedding.field_map.output}}" : {
65- "type" : " rank_features"
66- },
67- "${{create_ingest_pipeline.text_embedding.field_map.input}}" : {
68- "type" : " text"
69- }
62+ "properties" : {
63+ "${{create_ingest_pipeline.text_embedding.field_map.output}}" : {
64+ "type" : " rank_features"
65+ },
66+ "${{create_ingest_pipeline.text_embedding.field_map.input}}" : {
67+ "type" : " text"
7068 }
7169 }
7270 }
Original file line number Diff line number Diff line change 4747 "number_of_shards" : " ${{create_index.settings.number_of_shards}}"
4848 },
4949 "mappings" : {
50- "_doc" : {
51- "properties" : {
52- "${{text_embedding.field_map.output}}" : {
53- "type" : " knn_vector" ,
54- "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
55- "method" : {
56- "engine" : " ${{create_index.mappings.method.engine}}" ,
57- "space_type" : " ${{create_index.mappings.method.space_type}}" ,
58- "name" : " ${{create_index.mappings.method.name}}" ,
59- "parameters" : {}
60- }
61- },
62- "${{text_embedding.field_map.input}}" : {
63- "type" : " text"
50+ "properties" : {
51+ "${{text_embedding.field_map.output}}" : {
52+ "type" : " knn_vector" ,
53+ "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
54+ "method" : {
55+ "engine" : " ${{create_index.mappings.method.engine}}" ,
56+ "space_type" : " ${{create_index.mappings.method.space_type}}" ,
57+ "name" : " ${{create_index.mappings.method.name}}" ,
58+ "parameters" : {}
6459 }
60+ },
61+ "${{text_embedding.field_map.input}}" : {
62+ "type" : " text"
6563 }
6664 }
6765 }
Original file line number Diff line number Diff line change 9797 "index.search.default_pipeline" : " ${{create_search_pipeline.pipeline_id}}"
9898 },
9999 "mappings" : {
100- "_doc" : {
101- "properties" : {
102- "${{text_embedding.field_map.output}}" : {
103- "type" : " knn_vector" ,
104- "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
105- "method" : {
106- "engine" : " ${{create_index.mappings.method.engine}}" ,
107- "space_type" : " ${{create_index.mappings.method.space_type}}" ,
108- "name" : " ${{create_index.mappings.method.name}}" ,
109- "parameters" : {}
110- }
111- },
112- "${{text_embedding.field_map.input}}" : {
113- "type" : " text"
100+ "properties" : {
101+ "${{text_embedding.field_map.output}}" : {
102+ "type" : " knn_vector" ,
103+ "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
104+ "method" : {
105+ "engine" : " ${{create_index.mappings.method.engine}}" ,
106+ "space_type" : " ${{create_index.mappings.method.space_type}}" ,
107+ "name" : " ${{create_index.mappings.method.name}}" ,
108+ "parameters" : {}
114109 }
110+ },
111+ "${{text_embedding.field_map.input}}" : {
112+ "type" : " text"
115113 }
116114 }
117115 }
129127 "configurations" : {
130128 "request_processors" : [
131129 {
132- "neural_query_enricher" : {
130+ "neural_query_enricher" : {
133131 "description" : " Sets the default model ID at index and field levels" ,
134132 "default_model_id" : " ${{register_model.model_id}}"
135133 }
Original file line number Diff line number Diff line change 9696 "number_of_shards" : " ${{create_index.settings.number_of_shards}}"
9797 },
9898 "mappings" : {
99- "_doc" : {
100- "properties" : {
101- "${{text_embedding.field_map.output}}" : {
102- "type" : " knn_vector" ,
103- "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
104- "method" : {
105- "engine" : " ${{create_index.mappings.method.engine}}" ,
106- "space_type" : " ${{create_index.mappings.method.space_type}}" ,
107- "name" : " ${{create_index.mappings.method.name}}" ,
108- "parameters" : {}
109- }
110- },
111- "${{text_embedding.field_map.input}}" : {
112- "type" : " text"
99+ "properties" : {
100+ "${{text_embedding.field_map.output}}" : {
101+ "type" : " knn_vector" ,
102+ "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
103+ "method" : {
104+ "engine" : " ${{create_index.mappings.method.engine}}" ,
105+ "space_type" : " ${{create_index.mappings.method.space_type}}" ,
106+ "name" : " ${{create_index.mappings.method.name}}" ,
107+ "parameters" : {}
113108 }
109+ },
110+ "${{text_embedding.field_map.input}}" : {
111+ "type" : " text"
114112 }
115113 }
116114 }
Original file line number Diff line number Diff line change 4040 "configurations" : {
4141 "request_processors" : [
4242 {
43- "neural_query_enricher" : {
43+ "neural_query_enricher" : {
4444 "description" : " Sets the default model ID at index and field levels" ,
4545 "default_model_id" : " ${{create_ingest_pipeline.model_id}}"
4646 }
6565 "index.search.default_pipeline" : " ${{create_search_pipeline.pipeline_id}}"
6666 },
6767 "mappings" : {
68- "_doc" : {
69- "properties" : {
70- "${{text_embedding.field_map.output}}" : {
71- "type" : " knn_vector" ,
72- "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
73- "method" : {
74- "engine" : " ${{create_index.mappings.method.engine}}" ,
75- "space_type" : " ${{create_index.mappings.method.space_type}}" ,
76- "name" : " ${{create_index.mappings.method.name}}" ,
77- "parameters" : {}
78- }
79- },
80- "${{text_embedding.field_map.input}}" : {
81- "type" : " text"
68+ "properties" : {
69+ "${{text_embedding.field_map.output}}" : {
70+ "type" : " knn_vector" ,
71+ "dimension" : " ${{text_embedding.field_map.output.dimension}}" ,
72+ "method" : {
73+ "engine" : " ${{create_index.mappings.method.engine}}" ,
74+ "space_type" : " ${{create_index.mappings.method.space_type}}" ,
75+ "name" : " ${{create_index.mappings.method.name}}" ,
76+ "parameters" : {}
8277 }
78+ },
79+ "${{text_embedding.field_map.input}}" : {
80+ "type" : " text"
8381 }
8482 }
8583 }
You can’t perform that action at this time.
0 commit comments