Skip to content

Commit

Permalink
Add search_after to geonames and http_logs (#130)
Browse files Browse the repository at this point in the history
As we are optimizing "search_after" performance, we would like to
measure it. This adds "search_after" operation to geonames
and http_logs with a big enough value for "search_after".

1. geonames
- "population" field. As most documents have 0 value for this field,
search_after was added to asc sort.
- "geonameid" field has unique values for each document.
"search_after" was set to 5000000, as an approximate medium
value.

2. http_logs
- "@timestamp" field, "search_after" was set to "1998-06-10"
for desc and asc sorts, which is a medium value.
  • Loading branch information
mayya-sharipova authored Sep 22, 2020
1 parent 0e3b383 commit 6bb91d4
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 0 deletions.
18 changes: 18 additions & 0 deletions geonames/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,35 @@
"iterations": 100,
"target-throughput": 1.5
},
{
"operation": "asc_sort_with_after_population",
"warmup-iterations": 200,
"iterations": 100,
"target-throughput": 1.5
},
{
"operation": "desc_sort_geonameid",
"warmup-iterations": 200,
"iterations": 100,
"target-throughput": 6
},
{
"operation": "desc_sort_with_after_geonameid",
"warmup-iterations": 200,
"iterations": 100,
"target-throughput": 6
},
{
"operation": "asc_sort_geonameid",
"warmup-iterations": 200,
"iterations": 100,
"target-throughput": 6
},
{
"operation": "asc_sort_with_after_geonameid",
"warmup-iterations": 200,
"iterations": 100,
"target-throughput": 6
}
]
},
Expand Down
41 changes: 41 additions & 0 deletions geonames/operations/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,19 @@
]
}
},
{
"name": "asc_sort_with_after_population",
"operation-type": "search",
"body": {
"query": {
"match_all": {}
},
"sort" : [
{"population" : "asc"}
],
"search_after" : [1000000]
}
},
{
"name": "desc_sort_geonameid",
"operation-type": "search",
Expand All @@ -329,6 +342,20 @@
]
}
},
{
"name": "desc_sort_with_after_geonameid",
"operation-type": "search",
"body": {
"track_total_hits": false,
"query": {
"match_all": {}
},
"sort" : [
{"geonameid" : "desc"}
],
"search_after": [5000000]
}
},
{
"name": "asc_sort_geonameid",
"operation-type": "search",
Expand All @@ -340,4 +367,18 @@
{"geonameid" : "asc"}
]
}
},
{
"name": "asc_sort_with_after_geonameid",
"operation-type": "search",
"body": {
"track_total_hits": false,
"query": {
"match_all": {}
},
"sort" : [
{"geonameid" : "asc"}
],
"search_after": [5000000]
}
}
26 changes: 26 additions & 0 deletions http_logs/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@
"iterations": 100,
"target-throughput": 0.5
},
{
"operation": "desc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100,
"target-throughput": 0.5
},
{
"operation": "asc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100,
"target-throughput": 0.5
},
{
"name": "force-merge-1-seg",
"operation": {
Expand Down Expand Up @@ -136,6 +148,20 @@
"warmup-iterations": 200,
"iterations": 100,
"target-throughput": 2
},
{
"name": "desc-sort-with-after-timestamp-after-force-merge-1-seg",
"operation": "desc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100,
"target-throughput": 0.5
},
{
"name": "asc-sort-with-after-timestamp-after-force-merge-1-seg",
"operation": "asc_sort_with_after_timestamp",
"warmup-iterations": 10,
"iterations": 100,
"target-throughput": 0.5
}
]
},
Expand Down
30 changes: 30 additions & 0 deletions http_logs/operations/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@
]
}
},
{
"name": "desc_sort_with_after_timestamp",
"operation-type": "search",
"index": "logs-*",
"body": {
"track_total_hits": false,
"query": {
"match_all": {}
},
"sort" : [
{"@timestamp" : "desc"}
],
"search_after": ["1998-06-10"]
}
},
{
"name": "asc_sort_timestamp",
"operation-type": "search",
Expand All @@ -133,6 +148,21 @@
]
}
},
{
"name": "asc_sort_with_after_timestamp",
"operation-type": "search",
"index": "logs-*",
"body": {
"track_total_hits": false,
"query": {
"match_all": {}
},
"sort" : [
{"@timestamp" : "asc"}
],
"search_after": ["1998-06-10"]
}
},
{
"name": "create-http-log-baseline-pipeline",
"operation-type": "put-pipeline",
Expand Down

0 comments on commit 6bb91d4

Please sign in to comment.