FlatObjectFieldMapper calls getFields, not getField?

I was considering creating a pull request, but I want to confirm whether this behavior is expected. In FlatObjectFieldMapper#parseValueAddFields, getFields is called, but I think getField needs to be used. So, the fix is like this? If my understanding is correct, I can create PR.

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch 2.7

Describe the issue:
getFields is called in FlatObjectFieldMapper#parseValueAddFields. getFields returns Fields array, so it does not match.


Relevant Logs or Screenshots:

Hi @shinsuke , this is 100% a bug, thank you for spotting it, could you please open an issue here [1]? Thank you.

[1] Issues · opensearch-project/OpenSearch · GitHub

1 Like

Adding a link to the filed bug: [BUG] FlatObjectFieldMapper calls getFields, not getField · Issue #7835 · opensearch-project/OpenSearch · GitHub

Thanks @shinsuke for catching this!