@@ -953,6 +953,46 @@ false | null
953
953
false | null
954
954
;
955
955
956
+ startsWithLucenePushdown
957
+
958
+ from hosts
959
+ | where starts_with(host, "bet") and starts_with(host_group, "Kuber")
960
+ | keep host, host_group
961
+ | sort host, host_group;
962
+
963
+ host:keyword | host_group:text
964
+ beta | Kubernetes cluster
965
+ beta | Kubernetes cluster
966
+ beta | Kubernetes cluster
967
+ ;
968
+
969
+ startsWithLuceneDisabledPushdown
970
+
971
+ from hosts
972
+ | where host == "unknown host" or (starts_with(host, "bet") and starts_with(host_group, "Kuber"))
973
+ | keep host, host_group
974
+ | sort host, host_group;
975
+
976
+ host:keyword | host_group:text
977
+ beta | Kubernetes cluster
978
+ beta | Kubernetes cluster
979
+ beta | Kubernetes cluster
980
+ ;
981
+
982
+ startsWithLucenePushdownIgnoreMultivalues
983
+
984
+ from hosts
985
+ | where starts_with(description, "epsilon")
986
+ | keep description
987
+ | sort description;
988
+
989
+ warning:Line 2:9: evaluation of [starts_with(description, \"epsilon\")] failed, treating result as null. Only first 20 failures recorded.
990
+ warning:Line 2:9: java.lang.IllegalArgumentException: single-value function encountered multi-value
991
+
992
+ description:text
993
+ epsilon gw instance
994
+ ;
995
+
956
996
substringOfText
957
997
958
998
from hosts | where host=="epsilon" | eval l1 = substring(host_group, 0, 5), l2 = substring(description, 0, 5) | keep l1, l2;
@@ -1179,6 +1219,138 @@ Bernatsky |false
1179
1219
;
1180
1220
1181
1221
1222
+ endsWithLucenePushdown
1223
+
1224
+ from hosts
1225
+ | where ends_with(host, "ta") and ends_with(host_group, "cluster")
1226
+ | keep host, host_group
1227
+ | sort host, host_group;
1228
+
1229
+ host:keyword | host_group:text
1230
+ beta | Kubernetes cluster
1231
+ beta | Kubernetes cluster
1232
+ beta | Kubernetes cluster
1233
+ ;
1234
+
1235
+ endsWithLuceneDisabledPushdown
1236
+
1237
+ from hosts
1238
+ | where host == "unknown host" or (ends_with(host, "ta") and ends_with(host_group, "cluster"))
1239
+ | keep host, host_group
1240
+ | sort host, host_group;
1241
+
1242
+ host:keyword | host_group:text
1243
+ beta | Kubernetes cluster
1244
+ beta | Kubernetes cluster
1245
+ beta | Kubernetes cluster
1246
+ ;
1247
+
1248
+ endsWithLucenePushdownIgnoreMultivalues
1249
+
1250
+ from hosts
1251
+ | where ends_with(description, "host")
1252
+ | keep description
1253
+ | sort description;
1254
+
1255
+ warning:Line 2:9: evaluation of [ends_with(description, \"host\")] failed, treating result as null. Only first 20 failures recorded.
1256
+ warning:Line 2:9: java.lang.IllegalArgumentException: single-value function encountered multi-value
1257
+
1258
+ description:text
1259
+ ;
1260
+
1261
+
1262
+ lucenePushdownMultipleWhere
1263
+
1264
+ from hosts
1265
+ | where starts_with(host, "bet")
1266
+ | keep host, host_group
1267
+ | sort host, host_group
1268
+ | where ends_with(host_group, "cluster");
1269
+
1270
+ host:keyword | host_group:text
1271
+ beta | Kubernetes cluster
1272
+ beta | Kubernetes cluster
1273
+ beta | Kubernetes cluster
1274
+ ;
1275
+
1276
+ lucenePushdownMultipleIndices
1277
+
1278
+ from airports* metadata _index
1279
+ | where starts_with(name::keyword, "Sahn") and ends_with(abbrev, "UH")
1280
+ | keep abbrev, name, _index
1281
+ | sort abbrev, name, _index;
1282
+
1283
+ abbrev:keyword | name:text | _index:keyword
1284
+ LUH | Sahnewal | airports
1285
+ LUH | Sahnewal | airports_mp
1286
+ LUH | Sahnewal | airports_no_doc_values
1287
+ LUH | Sahnewal | airports_not_indexed
1288
+ LUH | Sahnewal | airports_not_indexed_nor_doc_values
1289
+ LUH | Sahnewal | airports_web
1290
+ ;
1291
+
1292
+ lucenePushdownOr
1293
+
1294
+ from airports
1295
+ | where starts_with(name::keyword, "Sahn") or ends_with(abbrev, "UH")
1296
+ | keep abbrev, name
1297
+ | sort abbrev, name;
1298
+
1299
+ abbrev:keyword | name:text
1300
+ AUH | Abu Dhabi Int'l
1301
+ LUH | Sahnewal
1302
+ RUH | King Khalid Int'l
1303
+ ;
1304
+
1305
+ lucenePushdownMultipleOr
1306
+
1307
+ from airports
1308
+ | where starts_with(name::keyword, "Sahn") or ends_with(abbrev, "UH") or starts_with(abbrev, "OOL")
1309
+ | keep abbrev, name
1310
+ | sort abbrev, name;
1311
+
1312
+ abbrev:keyword | name:text
1313
+ AUH | Abu Dhabi Int'l
1314
+ LUH | Sahnewal
1315
+ OOL | Gold Coast
1316
+ RUH | King Khalid Int'l
1317
+ ;
1318
+
1319
+ lucenePushdownMultipleAnd
1320
+
1321
+ from airports metadata _index
1322
+ | where starts_with(name::keyword, "Sahn") and ends_with(abbrev, "UH")
1323
+ | where ends_with(name::keyword, "al")
1324
+ | keep abbrev, name, _index
1325
+ | sort abbrev, name, _index;
1326
+
1327
+ abbrev:keyword | name:text | _index:keyword
1328
+ LUH | Sahnewal | airports
1329
+ ;
1330
+
1331
+ lucenePushdownMixAndOr
1332
+
1333
+ from airports
1334
+ | where starts_with(name::keyword, "Sahn") and (starts_with(name::keyword, "Abc") or ends_with(abbrev, "UH"))
1335
+ | keep abbrev, name, scalerank
1336
+ | sort abbrev, name;
1337
+
1338
+ abbrev:keyword | name:text | scalerank:integer
1339
+ LUH | Sahnewal | 9
1340
+ ;
1341
+
1342
+ lucenePushdownMixOrAnd
1343
+
1344
+ from airports* metadata _index
1345
+ | where starts_with(name::keyword, "Sahn") or (starts_with(abbrev, "G") and ends_with(name::keyword, "Falls Int'l"))
1346
+ | where ends_with(_index, "airports")
1347
+ | keep abbrev, name, scalerank, _index
1348
+ | sort abbrev;
1349
+
1350
+ abbrev:keyword | name:text | scalerank:integer | _index:keyword
1351
+ GTF | Great Falls Int'l | 8 | airports
1352
+ LUH | Sahnewal | 9 | airports
1353
+ ;
1182
1354
1183
1355
toLowerRow#[skip:-8.12.99]
1184
1356
// tag::to_lower[]
0 commit comments