@@ -280,10 +280,13 @@ public void testObject() {
280
280
281
281
public void testNested () {
282
282
final IndexResolution idxr = loadIndexResolution ("mapping-nested.json" );
283
- accept (idxr , "foo where processes.pid == 0" );
284
-
283
+ assertEquals ("1:11: Cannot use field [processes] type [nested] due to nested fields not being supported yet" ,
284
+ error (idxr , "foo where processes == 0" ));
285
+ assertEquals ("1:11: Cannot use field [processes.pid] type [long] with unsupported nested type in hierarchy (field [processes])" ,
286
+ error (idxr , "foo where processes.pid == 0" ));
285
287
assertEquals ("1:11: Unknown column [processe.pid], did you mean any of [processes.pid, processes.path, processes.path.keyword]?" ,
286
288
error (idxr , "foo where processe.pid == 0" ));
289
+ accept (idxr , "foo where long_field == 123" );
287
290
}
288
291
289
292
public void testGeo () {
@@ -314,20 +317,24 @@ public void testMultiField() {
314
317
315
318
accept (idxr , "foo where multi_field_options.raw == 'bar'" );
316
319
accept (idxr , "foo where multi_field_options.key == 'bar'" );
317
-
318
320
accept (idxr , "foo where multi_field_ambiguous.one == 'bar'" );
319
321
accept (idxr , "foo where multi_field_ambiguous.two == 'bar'" );
322
+
320
323
assertEquals ("1:11: [multi_field_ambiguous.normalized == 'bar'] cannot operate on first argument field of data type [keyword]: " +
321
324
"Normalized keyword field cannot be used for exact match operations" ,
322
325
error (idxr , "foo where multi_field_ambiguous.normalized == 'bar'" ));
323
-
324
- assertEquals ("1:11: [multi_field_nested.dep_name == 'bar'] cannot operate on first argument field of data type [text]: " +
325
- "No keyword/multi-field defined exact matches for [dep_name]; define one or use MATCH/QUERY instead" ,
326
+ assertEquals ("1:11: Cannot use field [multi_field_nested.dep_name] type [text] with unsupported nested type in hierarchy " +
327
+ "(field [multi_field_nested])" ,
326
328
error (idxr , "foo where multi_field_nested.dep_name == 'bar'" ));
327
-
328
- accept (idxr , "foo where multi_field_nested.dep_id.keyword == 'bar'" );
329
- accept (idxr , "foo where multi_field_nested.end_date == ''" );
330
- accept (idxr , "foo where multi_field_nested.start_date == 'bar'" );
329
+ assertEquals ("1:11: Cannot use field [multi_field_nested.dep_id.keyword] type [keyword] with unsupported nested type in " +
330
+ "hierarchy (field [multi_field_nested])" ,
331
+ error (idxr , "foo where multi_field_nested.dep_id.keyword == 'bar'" ));
332
+ assertEquals ("1:11: Cannot use field [multi_field_nested.end_date] type [datetime] with unsupported nested type in " +
333
+ "hierarchy (field [multi_field_nested])" ,
334
+ error (idxr , "foo where multi_field_nested.end_date == ''" ));
335
+ assertEquals ("1:11: Cannot use field [multi_field_nested.start_date] type [datetime] with unsupported nested type in " +
336
+ "hierarchy (field [multi_field_nested])" ,
337
+ error (idxr , "foo where multi_field_nested.start_date == 'bar'" ));
331
338
}
332
339
333
340
public void testStringFunctionWithText () {
0 commit comments