Skip to content

Commit

Permalink
[Type removal] Remove _type from _bulk yaml test, scripts, unused con…
Browse files Browse the repository at this point in the history
…stants (#3372) (#3392)

* [Type removal] Remove redundant _type deprecation checks in bulk request

Signed-off-by: Suraj Singh <surajrider@gmail.com>

* [Type removal] bulk yaml tests validating deprecation on _type and removal from scripts

Signed-off-by: Suraj Singh <surajrider@gmail.com>
(cherry picked from commit 7a73fb5)

Co-authored-by: Suraj Singh <surajrider@gmail.com>
  • Loading branch information
opensearch-trigger-bot[bot] and dreamer-89 committed May 18, 2022
1 parent 35d070d commit 3e97a5a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public void testMetadataAvailable() throws Exception {

TestProcessor innerProcessor = new TestProcessor(id -> {
id.setFieldValue("_ingest._value.index", id.getSourceAndMetadata().get("_index"));
id.setFieldValue("_ingest._value.type", id.getSourceAndMetadata().get("_type"));
id.setFieldValue("_ingest._value.id", id.getSourceAndMetadata().get("_id"));
});
ForEachProcessor processor = new ForEachProcessor("_tag", null, "values", innerProcessor, false);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ protected Map<String, Function<Map<String, Object>, Object>> pluginScripts() {
scripts.put("_fields['num1'].value", vars -> fieldsScript(vars, "num1"));
scripts.put("_fields._uid.value", vars -> fieldsScript(vars, "_uid"));
scripts.put("_fields._id.value", vars -> fieldsScript(vars, "_id"));
scripts.put("_fields._type.value", vars -> fieldsScript(vars, "_type"));

scripts.put("_source.obj1", vars -> sourceScript(vars, "obj1"));
scripts.put("_source.obj1.test", vars -> sourceScript(vars, "obj1.test"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
static final class Fields {
static final String DOCS = "docs";
static final String _INDEX = "_index";
static final String _TYPE = "_type";
static final String _ID = "_id";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ public static class ContextFields {
public static final String SOURCE = "_source";
public static final String NOW = "_now";
public static final String INDEX = "_index";
public static final String TYPE = "_type";
public static final String ID = "_id";
public static final String VERSION = "_version";
public static final String ROUTING = "_routing";
Expand Down

0 comments on commit 3e97a5a

Please sign in to comment.