Skip to content

Commit

Permalink
FIXED assemble error because OpenSearch move strings into core. AS op…
Browse files Browse the repository at this point in the history
…ensearch-project/OpenSearch#9103 shows.

Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
  • Loading branch information
luyuncheng committed Aug 8, 2023
1 parent 7ffe35d commit 3ff1b5e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import org.apache.lucene.document.FieldType;
import org.opensearch.common.Explicit;
import org.opensearch.common.Strings;
import org.opensearch.common.xcontent.XContentFactory;
import org.opensearch.knn.index.KNNMethodContext;
import org.opensearch.knn.index.util.KNNEngine;
Expand Down Expand Up @@ -50,7 +49,7 @@ public class MethodFieldMapper extends KNNVectorFieldMapper {
try {
this.fieldType.putAttribute(
PARAMETERS,
Strings.toString(XContentFactory.jsonBuilder().map(knnEngine.getMethodAsMap(knnMethodContext)))
XContentFactory.jsonBuilder().map(knnEngine.getMethodAsMap(knnMethodContext)).toString()
);
} catch (IOException ioe) {
throw new RuntimeException(String.format("Unable to create KNNVectorFieldMapper: %s", ioe));
Expand Down

0 comments on commit 3ff1b5e

Please sign in to comment.