opensearch-java icon indicating copy to clipboard operation
opensearch-java copied to clipboard

[FEATURE] allow setting an arbitrary json property on any level of any API request objects

Open L00kian opened this issue 1 year ago • 4 comments

Is your feature request related to a problem?

Current Java API doesn't contain definition of 'mapping' object within org.opensearch.client.opensearch.indices.IndexSettings and doesn't allow a non-declared json field to be added to the payload

What solution would you like?

Either add mapping.totalFields.limit properties chain to IndexSettings object or consider allowing setting an arbitrary json property on any level of any API request objects

What alternatives have you considered?

Using high-level rest client as a workaround

Do you have any additional context?

Nope

L00kian avatar Feb 28 '23 11:02 L00kian

Looks right, want to contribute @L00kian ?

dblock avatar Feb 28 '23 20:02 dblock

Hi @dblock, which option would be the way to go? arbitrary fields support on all the levels or just adding the field?

Can and will contribute :)

L00kian avatar Mar 01 '23 08:03 L00kian

Both! I think that arbitrary fields support on all the levels makes some sense because it will provide a workaround quickly, but that also means that one could theoretically add fields that don't exist. I would fix any missing field as 1 PR and then independently propose an arbitrary field solution and we can discuss that on its own merits. WDYT?

dblock avatar Mar 01 '23 17:03 dblock

I'm renaming this issue to refer to the remaining proposal.

wbeckler avatar Oct 03 '23 04:10 wbeckler