-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Core/Infra/REST APIREST infrastructure and utilitiesREST infrastructure and utilities>enhancementhelp wantedadoptmeadoptme
Description
Today the RestGetIndicesAction registers:
controller.registerHandler(GET, "/{index}", this);
controller.registerHandler(GET, "/{index}/{type}", this);
... where {type} is zero or more of _aliases, _mappings, _settings, _warmers (which should be removed)
But then we have RestGetFieldMappingAction which registers:
controller.registerHandler(GET, "/_mapping/field/{fields}", this);
controller.registerHandler(GET, "/_mapping/{type}/field/{fields}", this);
controller.registerHandler(GET, "/{index}/_mapping/field/{fields}", this);
controller.registerHandler(GET, "/{index}/{type}/_mapping/field/{fields}", this);
controller.registerHandler(GET, "/{index}/_mapping/{type}/field/{fields}", this);
and RestGetSettingsAction which registers:
controller.registerHandler(GET, "/{index}/_settings/{name}", this);
controller.registerHandler(GET, "/_settings/{name}", this);
controller.registerHandler(GET, "/{index}/_setting/{name}", this);
and the deprecated RestGetIndicesAliasesAction which registers:
controller.registerHandler(GET, "/{index}/_aliases/{name}", this);
controller.registerHandler(GET, "/_aliases/{name}", this);
This makes for some confusion eg you'd expect GET index/_settings to be handled by RestGetSettingsAction but actually you have to specify eg GET index/_settings/* in order to force that code path.
Can we refactor this to simplify the code?
- RestGetIndicesAliasesAction is already deprecated.
- I'm not sure that
GET {index}/_settings/{name}really needs to be supported. I think we can get rid of it in master. - The
GET index/type/_mappingorder has been deprecated since 1.0 in favour ofGET index/_mapping/type, which just leaves handling the GET _mapping/field structure
Metadata
Metadata
Assignees
Labels
:Core/Infra/REST APIREST infrastructure and utilitiesREST infrastructure and utilities>enhancementhelp wantedadoptmeadoptme