Skip to content

Commit

Permalink
Mappings: Remove delete mapping API
Browse files Browse the repository at this point in the history
Deleting a type from an index is inherently dangerous because
the type can be recreated with new mappings which may conflict
with existing segments still using the old mappings. This
removes the ability to delete a type (similar to how deleting
fields within a type is not allowed, for the same reason).

closes elastic#8877
closes elastic#10231
  • Loading branch information
rjernst committed Mar 24, 2015
1 parent 9c0f655 commit 693d91e
Show file tree
Hide file tree
Showing 26 changed files with 3 additions and 1,441 deletions.
3 changes: 0 additions & 3 deletions docs/reference/indices.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ and warmers.
* <<indices-put-mapping>>
* <<indices-get-mapping>>
* <<indices-get-field-mapping>>
* <<indices-delete-mapping>>
* <<indices-types-exists>>

[float]
Expand Down Expand Up @@ -82,8 +81,6 @@ include::indices/get-field-mapping.asciidoc[]

include::indices/types-exists.asciidoc[]

include::indices/delete-mapping.asciidoc[]

include::indices/aliases.asciidoc[]

include::indices/update-settings.asciidoc[]
Expand Down
25 changes: 0 additions & 25 deletions docs/reference/indices/delete-mapping.asciidoc

This file was deleted.

1 change: 1 addition & 0 deletions docs/reference/migration/migrate_2_0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ A `RoutingMissingException` is now thrown instead.
=== Mappings

* The setting `index.mapping.allow_type_wrapper` has been removed. Documents should always be sent without the type as the root element.
* The delete mappings API has been removed. Mapping types can no longer be deleted.

==== Removed type prefix on field names in queries
Types can no longer be specified on fields within queries. Instead, specify type restrictions in the search request.
Expand Down
35 changes: 0 additions & 35 deletions rest-api-spec/test/indices.delete_mapping/10_basic.yaml

This file was deleted.

275 changes: 0 additions & 275 deletions rest-api-spec/test/indices.delete_mapping/all_path_options.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions src/main/java/org/elasticsearch/action/ActionModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
import org.elasticsearch.action.admin.indices.flush.TransportFlushAction;
import org.elasticsearch.action.admin.indices.get.GetIndexAction;
import org.elasticsearch.action.admin.indices.get.TransportGetIndexAction;
import org.elasticsearch.action.admin.indices.mapping.delete.DeleteMappingAction;
import org.elasticsearch.action.admin.indices.mapping.delete.TransportDeleteMappingAction;
import org.elasticsearch.action.admin.indices.mapping.get.*;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingAction;
import org.elasticsearch.action.admin.indices.mapping.put.TransportPutMappingAction;
Expand Down Expand Up @@ -254,7 +252,6 @@ protected void configure() {
registerAction(GetMappingsAction.INSTANCE, TransportGetMappingsAction.class);
registerAction(GetFieldMappingsAction.INSTANCE, TransportGetFieldMappingsAction.class, TransportGetFieldMappingsIndexAction.class);
registerAction(PutMappingAction.INSTANCE, TransportPutMappingAction.class);
registerAction(DeleteMappingAction.INSTANCE, TransportDeleteMappingAction.class);
registerAction(IndicesAliasesAction.INSTANCE, TransportIndicesAliasesAction.class);
registerAction(UpdateSettingsAction.INSTANCE, TransportUpdateSettingsAction.class);
registerAction(AnalyzeAction.INSTANCE, TransportAnalyzeAction.class);
Expand Down
Loading

0 comments on commit 693d91e

Please sign in to comment.