Skip to content

Commit a9913fc

Browse files
committed
adding release notes change and some comments addressed
Signed-off-by: Amit Galitzky <amgalitz@amazon.com>
1 parent 583ec86 commit a9913fc

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

release-notes/opensearch-flow-framework.release-notes-2.13.0.0.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ Compatible with OpenSearch 2.13.0
1717

1818
### Refactoring
1919
* Moved workflow-steps.json to Enum ([#523](https://github.com/opensearch-project/flow-framework/pull/523))
20-
* Refactored logging for consistency ([#524](https://github.com/opensearch-project/flow-framework/pull/524))
20+
* Refactored logging for consistency ([#524](https://github.com/opensearch-project/flow-framework/pull/524))
21+
22+
### Bug Fixes
23+
* Fixing create index and use case input parsing bugs ([#600](https://github.com/opensearch-project/flow-framework/pull/600))

src/main/java/org/opensearch/flowframework/rest/RestCreateWorkflowAction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli
143143
} catch (Exception ex) {
144144
RestStatus status = ex instanceof IOException ? RestStatus.BAD_REQUEST : ExceptionsHelper.status(ex);
145145
String errorMessage =
146-
"failure parsing request body when a use case is given, make sure to provide a map with values that are either strings, arrays, or map of strings to strings";
146+
"failure parsing request body when a use case is given, make sure to provide a map with values that are either Strings, Arrays, or Map of Strings to Strings";
147147
logger.error(errorMessage, ex);
148148
throw new FlowFrameworkException(errorMessage, status);
149149
}

src/main/java/org/opensearch/flowframework/workflow/CreateIndexStep.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ public PlainActionFuture<WorkflowData> execute(
101101
createIndexRequest.source(sourceAsMap, LoggingDeprecationHandler.INSTANCE);
102102
}
103103
} catch (Exception ex) {
104-
String errorMessage = "Failed to create the index"
105-
+ indexName
106-
+ " due to incorrect mapping, make sure you aren't providing _doc in mapping";
104+
String errorMessage = "Failed to create the index" + indexName + ", _doc is not permitted in mapping";
107105
logger.error(errorMessage, ex);
108106
createIndexFuture.onFailure(new WorkflowStepException(errorMessage, RestStatus.BAD_REQUEST));
109107
}
@@ -153,6 +151,7 @@ public PlainActionFuture<WorkflowData> execute(
153151
// This method to check if the mapping contains a type `_doc` and if yes we fail the request
154152
// is to duplicate the behavior we have today through create index rest API, we want users
155153
// to encounter the same behavior and not suddenly have to add `_doc` while using our create_index step
154+
// related bug: https://github.com/opensearch-project/OpenSearch/issues/12775
156155
private static Map<String, Object> prepareMappings(Map<String, Object> source) {
157156
if (source.containsKey("mappings") == false || (source.get("mappings") instanceof Map) == false) {
158157
return source;

src/main/resources/defaults/conversational-search-defaults.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"create_search_pipeline.pipeline_id": "rag-pipeline",
1515
"create_search_pipeline.retrieval_augmented_generation.tag": "openai_pipeline_demo",
1616
"create_search_pipeline.retrieval_augmented_generation.description": "Demo pipeline Using cohere Connector",
17-
"create_search_pipeline.retrieval_augmented_generation.context_field_list": "[\"text\", \"hello\"]",
17+
"create_search_pipeline.retrieval_augmented_generation.context_field_list": "[\"text\"]",
1818
"create_search_pipeline.retrieval_augmented_generation.system_prompt": "You are a helpful assistant",
1919
"create_search_pipeline.retrieval_augmented_generation.user_instructions": "Generate a concise and informative answer in less than 100 words for the given question"
2020
}

0 commit comments

Comments
 (0)