This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch dropwizard-5 in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit c7a057f871a89f101b22414083b70da9eb195ea8 Author: Robert Newson <[email protected]> AuthorDate: Fri Nov 13 21:03:05 2026 +0000 remove deprecated api --- .../couchdb/nouveau/resources/IndexResource.java | 28 ------- src/nouveau/src/nouveau_api.erl | 90 ---------------------- 2 files changed, 118 deletions(-) diff --git a/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/resources/IndexResource.java b/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/resources/IndexResource.java index 182152a5d..be93b2151 100644 --- a/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/resources/IndexResource.java +++ b/extra/nouveau/src/main/java/org/apache/couchdb/nouveau/resources/IndexResource.java @@ -69,20 +69,6 @@ public final class IndexResource { return Ok.INSTANCE; } - @Deprecated(since = "3.5.2", forRemoval = true) - @DELETE - @Path("/doc/{docId}") - public Ok deleteDoc( - @PathParam("name") String name, - @PathParam("docId") String docId, - @NotNull @Valid DocumentDeleteRequest request) - throws Exception { - return indexManager.with(name, (index) -> { - index.delete(docId, request); - return Ok.INSTANCE; - }); - } - @DELETE public Ok deletePath(@PathParam("name") String path, @Valid final List<String> exclusions) throws IOException { indexManager.deleteAll(path, exclusions); @@ -127,20 +113,6 @@ public final class IndexResource { }); } - @Deprecated(since = "3.5.2", forRemoval = true) - @PUT - @Path("/doc/{docId}") - public Ok updateDoc( - @PathParam("name") String name, - @PathParam("docId") String docId, - @NotNull @Valid DocumentUpdateRequest request) - throws Exception { - return indexManager.with(name, (index) -> { - index.update(docId, request); - return Ok.INSTANCE; - }); - } - @POST @Path("/update") public Ok update(@PathParam("name") String name, @NotNull @Valid BulkUpdateRequest request) throws Exception { diff --git a/src/nouveau/src/nouveau_api.erl b/src/nouveau/src/nouveau_api.erl index fcf7d488c..e6bdb8cf9 100644 --- a/src/nouveau/src/nouveau_api.erl +++ b/src/nouveau/src/nouveau_api.erl @@ -23,9 +23,6 @@ create_index/2, delete_path/1, delete_path/2, - delete_doc/4, - purge_doc/4, - update_doc/6, search/2, set_purge_seq/3, set_update_seq/3, @@ -43,12 +40,6 @@ -define(JSON_CONTENT_TYPE, {"Content-Type", "application/json"}). --deprecated([ - {purge_doc, 4, "replaced by updates/2"}, - {update_doc, 6, "replaced by updates/2"}, - {delete_doc, 4, "replaced by updates/2"} -]). - analyze(Text, Analyzer) when is_binary(Text), is_binary(Analyzer) -> @@ -113,79 +104,6 @@ delete_path(Path, Exclusions) when send_error(Reason) end. -delete_doc(#index{} = Index, DocId, MatchSeq, UpdateSeq) when - is_binary(DocId), - is_integer(MatchSeq), - MatchSeq >= 0, - is_integer(UpdateSeq), - UpdateSeq > 0 --> - ReqBody = #{match_seq => MatchSeq, seq => UpdateSeq, purge => false}, - Resp = send_if_enabled( - doc_path(Index, DocId), - [?JSON_CONTENT_TYPE], - <<"DELETE">>, - jiffy:encode(ReqBody) - ), - case Resp of - {ok, 200, _, _} -> - ok; - {ok, StatusCode, _, RespBody} -> - {error, jaxrs_error(StatusCode, RespBody)}; - {error, Reason} -> - send_error(Reason) - end. - -purge_doc(#index{} = Index, DocId, MatchSeq, PurgeSeq) when - is_binary(DocId), - is_integer(MatchSeq), - MatchSeq >= 0, - is_integer(PurgeSeq), - PurgeSeq > 0 --> - ReqBody = #{match_seq => MatchSeq, seq => PurgeSeq, purge => true}, - Resp = send_if_enabled( - doc_path(Index, DocId), [?JSON_CONTENT_TYPE], <<"DELETE">>, jiffy:encode(ReqBody) - ), - case Resp of - {ok, 200, _, _} -> - ok; - {ok, StatusCode, _, RespBody} -> - {error, jaxrs_error(StatusCode, RespBody)}; - {error, Reason} -> - send_error(Reason) - end. - -update_doc(#index{} = Index, DocId, MatchSeq, UpdateSeq, Partition, Fields) when - is_binary(DocId), - is_integer(MatchSeq), - MatchSeq >= 0, - is_integer(UpdateSeq), - UpdateSeq > 0, - (is_binary(Partition) orelse Partition == null), - is_list(Fields) --> - ReqBody = #{ - match_seq => MatchSeq, - seq => UpdateSeq, - partition => Partition, - fields => Fields - }, - Resp = send_if_enabled( - doc_path(Index, DocId), - [?JSON_CONTENT_TYPE], - <<"PUT">>, - jiffy:encode(ReqBody) - ), - case Resp of - {ok, 200, _, _} -> - ok; - {ok, StatusCode, _, RespBody} -> - {error, jaxrs_error(StatusCode, RespBody)}; - {error, Reason} -> - send_error(Reason) - end. - update(#index{} = Index, Updates) when is_list(Updates) -> Resp = send_if_enabled( update_path(Index), @@ -321,14 +239,6 @@ index_path(Path) when is_binary(Path) -> index_path(#index{} = Index) -> [<<"/index/">>, couch_util:url_encode(nouveau_util:index_name(Index))]. -doc_path(#index{} = Index, DocId) -> - [ - <<"/index/">>, - couch_util:url_encode(nouveau_util:index_name(Index)), - <<"/doc/">>, - couch_util:url_encode(DocId) - ]. - search_path(#index{} = Index) -> [index_path(Index), <<"/search">>].
