@@ -48,7 +48,7 @@ public void testBasics() throws Exception {
48
48
int maxMatches = randomIntBetween (1 , 8 );
49
49
MockSearchFunction mockSearch = mockedSearchFunction (Map .of ("elastic.co" , Map .of ("globalRank" , 451 , "tldRank" ,23 , "tld" , "co" )));
50
50
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 ,
52
52
Map .of ("domain" , "elastic.co" ));
53
53
// Run
54
54
IngestDocument [] holder = new IngestDocument [1 ];
@@ -81,7 +81,7 @@ public void testBasics() throws Exception {
81
81
public void testNoMatch () throws Exception {
82
82
MockSearchFunction mockSearch = mockedSearchFunction ();
83
83
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 ,
85
85
Map .of ("domain" , "elastic.com" ));
86
86
int numProperties = ingestDocument .getSourceAndMetadata ().size ();
87
87
// Run
@@ -111,7 +111,7 @@ public void testSearchFailure() throws Exception {
111
111
String indexName = ".enrich-_name" ;
112
112
MockSearchFunction mockSearch = mockedSearchFunction (new IndexNotFoundException (indexName ));
113
113
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 ,
115
115
Map .of ("domain" , "elastic.com" ));
116
116
// Run
117
117
IngestDocument [] resultHolder = new IngestDocument [1 ];
@@ -146,18 +146,18 @@ public void testIgnoreKeyMissing() throws Exception {
146
146
{
147
147
MatchProcessor processor =
148
148
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 ());
150
150
151
- assertThat (ingestDocument .getSourceAndMetadata ().size (), equalTo (6 ));
151
+ assertThat (ingestDocument .getSourceAndMetadata ().size (), equalTo (5 ));
152
152
IngestDocument [] holder = new IngestDocument [1 ];
153
153
processor .execute (ingestDocument , (result , e ) -> holder [0 ] = result );
154
154
assertThat (holder [0 ], notNullValue ());
155
- assertThat (ingestDocument .getSourceAndMetadata ().size (), equalTo (6 ));
155
+ assertThat (ingestDocument .getSourceAndMetadata ().size (), equalTo (5 ));
156
156
}
157
157
{
158
158
MatchProcessor processor =
159
159
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 ());
161
161
IngestDocument [] resultHolder = new IngestDocument [1 ];
162
162
Exception [] exceptionHolder = new Exception [1 ];
163
163
processor .execute (ingestDocument , (result , e ) -> {
@@ -211,7 +211,7 @@ public void testNumericValue() {
211
211
MatchProcessor processor =
212
212
new MatchProcessor ("_tag" , mockSearch , "_name" , "domain" , "entry" , false , true , "domain" , maxMatches );
213
213
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 ));
215
215
216
216
// Execute
217
217
IngestDocument [] holder = new IngestDocument [1 ];
@@ -242,7 +242,7 @@ public void testArray() {
242
242
MatchProcessor processor =
243
243
new MatchProcessor ("_tag" , mockSearch , "_name" , "domain" , "entry" , false , true , "domain" , maxMatches );
244
244
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" )));
246
246
247
247
// Execute
248
248
IngestDocument [] holder = new IngestDocument [1 ];
0 commit comments