Skip to content

Commit

Permalink
Treat dot in field name as a nested field in field_map of text embedd…
Browse files Browse the repository at this point in the history
…ing processor

Signed-off-by: Sanjana679 <[email protected]>
  • Loading branch information
Sanjana679 committed Nov 9, 2023
1 parent 6f02ca9 commit a428d30
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Map<String, Object> buildMapWithProcessorKeyAndOriginalValue(IngestDocument inge
for (Map.Entry<String, Object> fieldMapEntry : fieldMap.entrySet()) {
String originalKey = fieldMapEntry.getKey();
Object targetKey = fieldMapEntry.getValue();

int nestedDotIndex = originalKey.indexOf('.');
if (nestedDotIndex != -1) {
Map<String, Object> temp = new LinkedHashMap<>();
Expand All @@ -163,7 +163,7 @@ Map<String, Object> buildMapWithProcessorKeyAndOriginalValue(IngestDocument inge

originalKey = originalKey.substring(0, nestedDotIndex);
}

if (targetKey instanceof Map) {
Map<String, Object> treeRes = new LinkedHashMap<>();
buildMapWithProcessorKeyAndOriginalValueForMapType(originalKey, targetKey, sourceAndMetadataMap, treeRes);
Expand Down

0 comments on commit a428d30

Please sign in to comment.