File tree 1 file changed +38
-0
lines changed
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -49,3 +49,41 @@ setup:
49
49
- match : { hits.hits.0.fields.location: [ { country: [ 'Canada' ], city: [ 'Montreal' ] } ] }
50
50
- match : { hits.hits.1.fields.msg: [ 'The second message' ] }
51
51
- match : { hits.hits.1.fields.location: null }
52
+
53
+ ---
54
+ " Fails to query or aggregate on lookup fields " :
55
+ - skip :
56
+ version : " - 8.1.99"
57
+ reason : " Lookup fields are introduced in 8.2"
58
+ - do :
59
+ catch : /Field \[location\] of type \[lookup\] does not support match queries/
60
+ search :
61
+ index : logs
62
+ body :
63
+ runtime_mappings :
64
+ location :
65
+ type : lookup
66
+ target_index : ip_locations
67
+ input_field : ip
68
+ target_field : _id
69
+ fetch_fields : [ "city"]
70
+ query :
71
+ match :
72
+ location : montreal
73
+
74
+ - do :
75
+ catch : /Fielddata is not supported on field \[location\] of type \[lookup\]/
76
+ search :
77
+ index : logs
78
+ body :
79
+ runtime_mappings :
80
+ location :
81
+ type : lookup
82
+ target_index : ip_locations
83
+ input_field : ip
84
+ target_field : _id
85
+ fetch_fields : [ "city" ]
86
+ aggs :
87
+ locations :
88
+ terms :
89
+ field : location
You can’t perform that action at this time.
0 commit comments