Remove types from Graph API#46935
Conversation
|
Pinging @elastic/es-analytics-geo |
| indices = in.readStringArray(); | ||
| indicesOptions = IndicesOptions.readIndicesOptions(in); | ||
| types = in.readStringArray(); | ||
| if (in.getVersion().before(Version.V_8_0_0)) { |
There was a problem hiding this comment.
I mentioned this in the PR for the explain API as well -- I think it'd be nice to read the types array and assert that it is empty.
| return this; | ||
| } | ||
|
|
||
| private static final String[] EMPTY_ARRAY = new String[]{}; |
There was a problem hiding this comment.
Instead of defining this variable, I think we could use Strings.EMPTY_ARRAY below.
There was a problem hiding this comment.
I knew we had a predefined array somewhere, and for some reason was unable to find it. Thanks!
| controller.registerWithDeprecatedHandler( | ||
| POST, "/{index}/{type}/_graph/explore", this, | ||
| POST, "/{index}/{type}/_xpack/graph/_explore", deprecationLogger); | ||
| controller.registerHandler(GET, "/{index}/_graph/explore", this); |
There was a problem hiding this comment.
It looks like we removed the deprecated _xpack endpoints here instead of the ones containing {type}. We could remove the ones with {type} in this PR, and leave the _xpack removal for a future PR?
There was a problem hiding this comment.
Oops, good catch - will fix.
|
I also spotted that I hadn't removed types from the Rest-High-Level client; I have updated the PR accordingly. |
adds back the typed and xpack endpoints for graph explore api prevoiusly removed in elastic#46935 relates main meta issue elastic#51816 relates types removal issue elastic#54160
The actual usage of types within the graph code was removed by #42112,
so this commit just removes them from the Rest API