epugh commented on code in PR #4943:
URL: https://github.com/apache/solr/pull/4943#discussion_r4100965628
##########
solr/api/src/java/org/apache/solr/client/api/endpoint/UpdateSchemaApi.java:
##########
@@ -112,25 +113,54 @@ SolrJerseyResponse addFieldType(
SolrJerseyResponse deleteFieldType(@PathParam("fieldTypeName") String
fieldTypeName)
throws Exception;
- // TODO Gah! Copyfields don't currently have names for us to create/delete
by name in an API like
- // /schema/copyfields/{copyFieldName}...figure out how to address this in a
way consistent with
- // all our other APIs. (In the meantime, the functionality is exposed
through the bulk API at
- // least.
- // @POST
- // @Path("/copyfields/{copyFieldName}")
- // @StoreApiParameters
- // @Operation(
- // summary = "Add a new copy-field with the specified name.",
- // tags = {"schema"})
- // SolrJerseyResponse addCopyField(@PathParam("copyFieldName") String
copyFieldName,
- // @RequestBody SchemaChangeOperation.AddCopyField requestBody) throws
Exception;
- //
- // @DELETE
- // @Path("/copyfields/{copyFieldName}")
- // @StoreApiParameters
- // @Operation(summary = "Remove the copy-field with the specified name.",
tags = {"schema"})
- // SolrJerseyResponse deleteCopyField(@PathParam("copyFieldName") String
copyFieldName) throws
- // Exception;
+ // Copy-field rules have no name of their own, so unlike the other schema
resources they are
+ // addressed by their source field. A single request therefore covers all
of the rules that
+ // share that source.
+ @PUT
+ @Path("/copyfields/{sourceField}")
+ @StoreApiParameters
+ @Operation(
+ summary =
+ "Set the copy-field rules for the specified source field. The given
destinations "
+ + "replace any rules that source already has.",
Review Comment:
Let's figure out what we want for the next ten years, not the previous ten
years. We want to make V2 better.. Not drag along V1 concepts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]