Skip to content

Commit 4ed9f76

Browse files
http_logs add search with int sort (#778)
This adds sorting on integer fields of "size" and "status". We are optimizing integer sort in elastic/elasticsearch/pull/127968, and it would be nice to have dedicated operations for integer sort. Notice, no target-throughput for these operations, as when optimization is merged we expect massive speedups.
1 parent b12b10c commit 4ed9f76

File tree

2 files changed

+99
-1
lines changed

2 files changed

+99
-1
lines changed

http_logs/challenges/common/default-schedule.json

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,26 @@
196196
"target-throughput": 2
197197
},
198198
{%- if not runtime_fields is defined %}
199+
{
200+
"operation": "sort_size_desc",
201+
"warmup-iterations": 200,
202+
"iterations": 100
203+
},
204+
{
205+
"operation": "sort_size_asc",
206+
"warmup-iterations": 200,
207+
"iterations": 100
208+
},
209+
{
210+
"operation": "sort_status_desc",
211+
"warmup-iterations": 200,
212+
"iterations": 100
213+
},
214+
{
215+
"operation": "sort_status_asc",
216+
"warmup-iterations": 200,
217+
"iterations": 100
218+
},
199219
{
200220
"operation": "sort_keyword_can_match_shortcut",
201221
"warmup-iterations": 200,
@@ -266,11 +286,37 @@
266286
"warmup-iterations": 10,
267287
"iterations": 100,
268288
"target-throughput": 1
269-
},
289+
},
270290
{
271291
"name": "asc-sort-with-after-timestamp-after-force-merge-1-seg",
272292
"operation": "asc_sort_with_after_timestamp",
273293
"warmup-iterations": 10,
274294
"iterations": 100,
275295
"target-throughput": 0.5
276296
}
297+
{%- if not runtime_fields is defined %},
298+
{
299+
"name": "sort-size-desc-after-force-merge-1-seg",
300+
"operation": "sort_size_desc",
301+
"warmup-iterations": 200,
302+
"iterations": 100
303+
},
304+
{
305+
"name": "sort-size-asc-after-force-merge-1-seg",
306+
"operation": "sort_size_asc",
307+
"warmup-iterations": 200,
308+
"iterations": 100
309+
},
310+
{
311+
"name": "sort-status-desc-after-force-merge-1-seg",
312+
"operation": "sort_status_desc",
313+
"warmup-iterations": 200,
314+
"iterations": 100
315+
},
316+
{
317+
"name": "sort-status-asc-after-force-merge-1-seg",
318+
"operation": "sort_status_asc",
319+
"warmup-iterations": 200,
320+
"iterations": 100
321+
}
322+
{%- endif %}

http_logs/operations/default.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,58 @@
334334
]
335335
}
336336
},
337+
{
338+
"name": "sort_size_desc",
339+
"operation-type": "search",
340+
"index": "logs-*",
341+
"body": {
342+
"query": {
343+
"match_all": {}
344+
},
345+
"sort" : [
346+
{"size" : "desc"}
347+
]
348+
}
349+
},
350+
{
351+
"name": "sort_size_asc",
352+
"operation-type": "search",
353+
"index": "logs-*",
354+
"body": {
355+
"query": {
356+
"match_all": {}
357+
},
358+
"sort" : [
359+
{"size" : "asc"}
360+
]
361+
}
362+
},
363+
{
364+
"name": "sort_status_desc",
365+
"operation-type": "search",
366+
"index": "logs-*",
367+
"body": {
368+
"query": {
369+
"match_all": {}
370+
},
371+
"sort" : [
372+
{"status" : "desc"}
373+
]
374+
}
375+
},
376+
{
377+
"name": "sort_status_asc",
378+
"operation-type": "search",
379+
"index": "logs-*",
380+
"body": {
381+
"query": {
382+
"match_all": {}
383+
},
384+
"sort" : [
385+
{"status" : "asc"}
386+
]
387+
}
388+
},
337389
{
338390
"name": "sort_numeric_can_match_shortcut",
339391
"operation-type": "search",

0 commit comments

Comments
 (0)