Skip to content

Commit

Permalink
support bwc for process function (opensearch-project#1427) (opensearc…
Browse files Browse the repository at this point in the history
…h-project#1439)

* support bwc for process function

Signed-off-by: Yaliang Wu <[email protected]>

* add comment

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit efe5566)

Co-authored-by: Yaliang Wu <[email protected]>
Signed-off-by: TrungBui59 <[email protected]>
  • Loading branch information
2 people authored and TrungBui59 committed Nov 21, 2023
1 parent 6746387 commit 3bacd8b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ private static RemoteInferenceInputDataSet processTextDocsInput(TextDocsInputDat
List<String> docs = new ArrayList<>();
for (String doc : inputDataSet.getDocs()) {
if (doc != null) {
docs.add(gson.toJson(doc));
String gsonString = gson.toJson(doc);
// in 2.9, user will add " before and after string
// gson.toString(string) will add extra " before after string, so need to remove
docs.add(gsonString.substring(1, gsonString.length() - 1));
} else {
docs.add(null);
}
Expand Down

0 comments on commit 3bacd8b

Please sign in to comment.