mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-11 15:35:05 +00:00
We'll migrate to NamedWriteable so we can share code with the rest of the system. So we can work on this in multiple pull requests without breaking Elasticsearch in between the commits this change supports *both* old style `InternalAggregations.stream` serialization and `NamedWriteable` style serialization. As such it creates about a half dozen `// NORELEASE` comments that will have to be removed once the migration is complete. This also introduces a boolean `transportClient` flag to `SearchModule` which is used to skip inappropriate registrations for for the transport client while still registering the things it needs. In this case that means that the `InternalAggregation` subclasses are registered with the `NamedWriteableRegistry` but the `AggregationBuilder` subclasses are not. Finally, this moves aggregation registration from guice configuration time to `SearchModule` construction time. This will make it simpler to work with in the future as we further clean up Elasticsearch's extension points.