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
Extensions need access to core NamedXContent, such as predefined range filters, cumulative sums, etc. These will need to be part of the content parser used with the ExtensionRestRequest:
#163 is now merged, so in an extension when processing an ExtensionRestRequest we will have a getXContentType() getter, returning either null, or one of the XContentType enums. The equivalent of contentParser() is:
Creating the registry like the above will probably end up being a function of createComponents() as part of issue #160 with the ExtensionsRunner class reading the getNamedXContent() from the extension (default empty list). cc: @owaiskazi19@joshpalis@ryanbogan
These should be initialized in the BaseExtension or as part of CreateComponents.
What solution would you like?
Generate the registry on the SDK side. It's easy except for the Search Module, but we can instantiate one (such as in the above example) and figure out how to instantiate its standard methods already in core.
In order to generate this Xcontent parser on the SDK side, we would first need to transport the consolidated namedXcontentRegistry ...
This is what I'm saying is ugly.
I'm suggesting we generate the whole registry fresh on the SDK side.
Wasting a lot of bandwidth communicating the entire registry (and content) over transport.
Do you have any additional context?
See opensearch-project/anomaly-detection#692 for some cherry-picked NamedXContent that would not be needed if we just had the whole registry available in a BaseExtension
The text was updated successfully, but these errors were encountered:
Extensions currently have an ExtensionNamedWriteableRegistry class that we can leverage.
There is an instance field namedWriteables intended to be the extension's named writeables, that is returned to OpenSearch via response handler if requested
There is a placeholder getNamedWritables() method that was envisioned to get the extension's named writeables, but is currently an empty list. That will be changed to a simple getter.
The no-arg constructor can be removed, leaving only the constructor that populates the namedWriteables method from a list.
That list will be fetched from an extension via getNamedWritables on the Extension interface (with a default empty list). This will be an exact copy of plugin implementation.
Internally the ExtensionNamedWriteableRegistry will also re-generate all the named writeables from OpenSearch. (We could request them sent over transport, but it's easy to just re-create them) and merge the two copies into a registry that can be sent to the extension via CreateComponents.
Is your feature request related to a problem?
Extensions need access to core NamedXContent, such as predefined range filters, cumulative sums, etc. These will need to be part of the content parser used with the ExtensionRestRequest:
These should be initialized in the BaseExtension or as part of CreateComponents.
What solution would you like?
Generate the registry on the SDK side. It's easy except for the Search Module, but we can instantiate one (such as in the above example) and figure out how to instantiate its standard methods already in core.
What alternatives have you considered?
Wasting a lot of bandwidth communicating the entire registry (and content) over transport.
Do you have any additional context?
See opensearch-project/anomaly-detection#692 for some cherry-picked NamedXContent that would not be needed if we just had the whole registry available in a BaseExtension
The text was updated successfully, but these errors were encountered: