Skip to content

Commit

Permalink
Performs inference even if text value is the same as previous
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Jan 15, 2024
1 parent d1bc78f commit 10a0eda
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -904,13 +904,8 @@ private static List<String> getFieldNamesForInference(
Object fieldValue = docMap.get(inferenceField);

// Perform inference on string, non-null values
if (fieldValue instanceof String fieldStringValue) {

// Only do inference if the previous text value doesn't match the new one
String previousValue = findMapValue(docMap, ROOT_RESULT_FIELD, inferenceField, TEXT_FIELD);
if (fieldStringValue.equals(previousValue) == false) {
inferenceFieldNames.add(inferenceField);
}
if (fieldValue instanceof String) {
inferenceFieldNames.add(inferenceField);
}
}
return inferenceFieldNames;
Expand Down

0 comments on commit 10a0eda

Please sign in to comment.