Skip to content

Commit 0ef3668

Browse files
committed
Remove _type argument from IngestDocument after merging in master
1 parent e06598b commit 0ef3668

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/GeoMatchProcessorTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private void testBasicsForFieldValue(Object fieldValue, Geometry expectedGeometr
6262
MockSearchFunction mockSearch = mockedSearchFunction(Map.of("key", Map.of("shape", "object", "zipcode",94040)));
6363
GeoMatchProcessor processor = new GeoMatchProcessor("_tag", mockSearch, "_name", "location", "entry",
6464
false, false, "shape", maxMatches, ShapeRelation.INTERSECTS);
65-
IngestDocument ingestDocument = new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL,
65+
IngestDocument ingestDocument = new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL,
6666
Map.of("location", fieldValue));
6767
// Run
6868
IngestDocument[] holder = new IngestDocument[1];

x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/MatchProcessorTests.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void testBasics() throws Exception {
4848
int maxMatches = randomIntBetween(1, 8);
4949
MockSearchFunction mockSearch = mockedSearchFunction(Map.of("elastic.co", Map.of("globalRank", 451, "tldRank",23, "tld", "co")));
5050
MatchProcessor processor = new MatchProcessor("_tag", mockSearch, "_name", "domain", "entry", true, false, "domain", maxMatches);
51-
IngestDocument ingestDocument = new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL,
51+
IngestDocument ingestDocument = new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL,
5252
Map.of("domain", "elastic.co"));
5353
// Run
5454
IngestDocument[] holder = new IngestDocument[1];
@@ -81,7 +81,7 @@ public void testBasics() throws Exception {
8181
public void testNoMatch() throws Exception {
8282
MockSearchFunction mockSearch = mockedSearchFunction();
8383
MatchProcessor processor = new MatchProcessor("_tag", mockSearch, "_name", "domain", "entry", true, false, "domain", 1);
84-
IngestDocument ingestDocument = new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL,
84+
IngestDocument ingestDocument = new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL,
8585
Map.of("domain", "elastic.com"));
8686
int numProperties = ingestDocument.getSourceAndMetadata().size();
8787
// Run
@@ -111,7 +111,7 @@ public void testSearchFailure() throws Exception {
111111
String indexName = ".enrich-_name";
112112
MockSearchFunction mockSearch = mockedSearchFunction(new IndexNotFoundException(indexName));
113113
MatchProcessor processor = new MatchProcessor("_tag", mockSearch, "_name", "domain", "entry", true, false, "domain", 1);
114-
IngestDocument ingestDocument = new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL,
114+
IngestDocument ingestDocument = new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL,
115115
Map.of("domain", "elastic.com"));
116116
// Run
117117
IngestDocument[] resultHolder = new IngestDocument[1];
@@ -146,18 +146,18 @@ public void testIgnoreKeyMissing() throws Exception {
146146
{
147147
MatchProcessor processor =
148148
new MatchProcessor("_tag", mockedSearchFunction(), "_name", "domain", "entry", true, true, "domain", 1);
149-
IngestDocument ingestDocument = new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of());
149+
IngestDocument ingestDocument = new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of());
150150

151-
assertThat(ingestDocument.getSourceAndMetadata().size(), equalTo(6));
151+
assertThat(ingestDocument.getSourceAndMetadata().size(), equalTo(5));
152152
IngestDocument[] holder = new IngestDocument[1];
153153
processor.execute(ingestDocument, (result, e) -> holder[0] = result);
154154
assertThat(holder[0], notNullValue());
155-
assertThat(ingestDocument.getSourceAndMetadata().size(), equalTo(6));
155+
assertThat(ingestDocument.getSourceAndMetadata().size(), equalTo(5));
156156
}
157157
{
158158
MatchProcessor processor =
159159
new MatchProcessor("_tag", mockedSearchFunction(), "_name", "domain", "entry", true, false, "domain", 1);
160-
IngestDocument ingestDocument = new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of());
160+
IngestDocument ingestDocument = new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of());
161161
IngestDocument[] resultHolder = new IngestDocument[1];
162162
Exception[] exceptionHolder = new Exception[1];
163163
processor.execute(ingestDocument, (result, e) -> {
@@ -211,7 +211,7 @@ public void testNumericValue() {
211211
MatchProcessor processor =
212212
new MatchProcessor("_tag", mockSearch, "_name", "domain", "entry", false, true, "domain", maxMatches);
213213
IngestDocument ingestDocument =
214-
new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of("domain", 2));
214+
new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of("domain", 2));
215215

216216
// Execute
217217
IngestDocument[] holder = new IngestDocument[1];
@@ -242,7 +242,7 @@ public void testArray() {
242242
MatchProcessor processor =
243243
new MatchProcessor("_tag", mockSearch, "_name", "domain", "entry", false, true, "domain", maxMatches);
244244
IngestDocument ingestDocument =
245-
new IngestDocument("_index", "_type", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of("domain", List.of("1", "2")));
245+
new IngestDocument("_index", "_id", "_routing", 1L, VersionType.INTERNAL, Map.of("domain", List.of("1", "2")));
246246

247247
// Execute
248248
IngestDocument[] holder = new IngestDocument[1];

0 commit comments

Comments
 (0)