You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// textField --> textFieldNotForEmbedding
nestedObj1.put("textFieldNotForEmbedding", "This is a text field")
In unit test, get the nlpResult from textEmbeddingProcessor.buildNLPResult, then set it to each field in original doc just like the embedding processor actually does:
// build nlp output for list of nested objects
for (Map<String, Object> nestedElement : (List<Map<String, Object>>) sourceAndMetadataMap.get(processorKey)) {
// Adding non empty check for inputNestedMapEntry, Only fill in embedding when value is not null
// if (inputNestedMapEntry.getValue().get(index) != null)
nestedElement.put(inputNestedMapEntry.getKey(), results.get(indexWrapper.index++));
}
What is the bug?
Currently, if a nested field
nestedField
with two sub fieldtextField
andtextFieldNotForEmbedding
, and a doc like:applying pipeline configuration:
Result:
Expected result:
How can one reproduce the bug?
Change the mock doc in test code:
In unit test, get the nlpResult from
textEmbeddingProcessor.buildNLPResult
, then set it to each field in original doc just like the embedding processor actually does:And run the unit test with:
What is the expected behavior?
Mentioned above.
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: