Skip to content

Commit

Permalink
fix(SearchDocumentTransformer): Use correct variable to update ES (da…
Browse files Browse the repository at this point in the history
  • Loading branch information
pinakipb2 authored Sep 20, 2024
1 parent c5e5925 commit 6af5c61
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,9 @@ private Optional<JsonNode> getNodeForValue(
// By default run toString
default:
String value = fieldValue.toString();
// If index type is BROWSE_PATH, make sure the value starts with a slash
if (fieldType == FieldType.BROWSE_PATH && !value.startsWith("/")) {
value = "/" + value;
}
return value.isEmpty()
? Optional.empty()
: Optional.of(JsonNodeFactory.instance.textNode(fieldValue.toString()));
: Optional.of(JsonNodeFactory.instance.textNode(value));
}
}

Expand Down

0 comments on commit 6af5c61

Please sign in to comment.