From d29cb750611395929df2d62d5c1a8146b9c2e971 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 2 Jul 2024 15:08:29 +0200 Subject: [PATCH] Add search workloads --- .../search/embeddings-movies-subset-hf.json | 171 +++++++++ workloads/search/filterable-movies.json | 94 +++++ workloads/search/geosort.json | 340 ++++++++++++++++++ workloads/search/hackernews.json | 255 +++++++++++++ workloads/search/movies.json | 90 +++++ workloads/search/sortable-movies.json | 110 ++++++ 6 files changed, 1060 insertions(+) create mode 100644 workloads/search/embeddings-movies-subset-hf.json create mode 100644 workloads/search/filterable-movies.json create mode 100644 workloads/search/geosort.json create mode 100644 workloads/search/hackernews.json create mode 100644 workloads/search/movies.json create mode 100644 workloads/search/sortable-movies.json diff --git a/workloads/search/embeddings-movies-subset-hf.json b/workloads/search/embeddings-movies-subset-hf.json new file mode 100644 index 000000000..aeeecac59 --- /dev/null +++ b/workloads/search/embeddings-movies-subset-hf.json @@ -0,0 +1,171 @@ +{ + "name": "search-movies-subset-hf-embeddings", + "run_count": 2, + "target": "search::=trace", + "extra_cli_args": [ + "--max-indexing-threads=4" + ], + "assets": { + "movies-100.json": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/movies-100.json", + "sha256": "d215e395e4240f12f03b8f1f68901eac82d9e7ded5b462cbf4a6b8efde76c6c6" + } + }, + "precommands": [ + { + "route": "experimental-features", + "method": "PATCH", + "body": { + "inline": { + "vectorStore": true + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres", + "release_date" + ], + "sortableAttributes": [ + "release_date" + ], + "searchCutoffMs": 15000 + } + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "embedders": { + "default": { + "source": "huggingFace", + "documentTemplate": "A movie titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}" + } + } + } + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "movies-100.json" + }, + "synchronous": "WaitForTask" + } + ], + "commands": [ + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "puppy cute comforting movie", + "limit": 100, + "hybrid": { + "semanticRatio": 0.1 + } + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "puppy cute comforting movie", + "limit": 100, + "hybrid": { + "semanticRatio": 0.5 + } + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "puppy cute comforting movie", + "limit": 100, + "hybrid": { + "semanticRatio": 0.9 + } + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "puppy cute comforting movie", + "limit": 100, + "hybrid": { + "semanticRatio": 1.0 + } + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "shrek", + "limit": 100, + "hybrid": { + "semanticRatio": 1.0 + } + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "shrek", + "limit": 100, + "hybrid": { + "semanticRatio": 0.5 + } + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "shrek", + "limit": 100, + "hybrid": { + "semanticRatio": 0.1 + } + } + }, + "synchronous": "WaitForResponse" + } + ] +} \ No newline at end of file diff --git a/workloads/search/filterable-movies.json b/workloads/search/filterable-movies.json new file mode 100644 index 000000000..5585c6eaf --- /dev/null +++ b/workloads/search/filterable-movies.json @@ -0,0 +1,94 @@ +{ + "name": "search-sortable-movies.json", + "run_count": 10, + "target": "search::=trace", + "extra_cli_args": [], + "assets": { + "movies.json": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/movies.json", + "sha256": "5b6e4cb660bc20327776e8a33ea197b43d9ec84856710ead1cc87ab24df77de1" + } + }, + "precommands": [ + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres", + "release_date" + ], + "sortableAttributes": [ + "release_date" + ], + "searchCutoffMs": 15000 + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "movies.json" + }, + "synchronous": "WaitForTask" + } + ], + "commands": [ + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "", + "limit": 100, + "filter": "genres IN [action, comedy, adventure] AND release_date = 233366400" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "Batman returns", + "limit": 100, + "filter": "genres IN [action, comedy, adventure] AND release_date > 233366400" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "the", + "limit": 100, + "filter": "genres IN [animation, comedy, adventure] AND release_date < 233366400" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "t", + "limit": 100, + "filter": "genres = Family AND release_date <= 233366400 OR release_date >= 1054252800" + } + }, + "synchronous": "WaitForResponse" + } + ] +} \ No newline at end of file diff --git a/workloads/search/geosort.json b/workloads/search/geosort.json new file mode 100644 index 000000000..00788f70b --- /dev/null +++ b/workloads/search/geosort.json @@ -0,0 +1,340 @@ +{ + "name": "search-geosort.jsonl_1M", + "run_count": 3, + "target": "search::=trace", + "extra_cli_args": [], + "assets": { + "smol-all-countries-100k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-100k.jsonl", + "sha256": "d00924689abc02d09ec4667cc5a18364ff7bc236bad51367f34b9184b945ece3" + }, + "smol-all-countries-200k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-200k.jsonl", + "sha256": "2a215b43b35d596d9da4f1071deab9002a93602e6dbf1308fba53eb89d9c5a9e" + }, + "smol-all-countries-300k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-300k.jsonl", + "sha256": "91d94d78eeb10d631557a5ccf775e74a41d14ccaff4d7121dd90c7aa35534f2b" + }, + "smol-all-countries-400k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-400k.jsonl", + "sha256": "ee883a353b571f35f4abb79b95cfa628f3f1c582919dd658a388b220f97fe035" + }, + "smol-all-countries-500k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-500k.jsonl", + "sha256": "5be254ce4c50db12b7f1795859b8bbdcbc2ec22bccb3a1898899bd4c4765a1bf" + }, + "smol-all-countries-600k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-600k.jsonl", + "sha256": "3aa91afe3361f5185c142125dfcdc8ddcb7d39fdeeeb4f5e67439511905e9826" + }, + "smol-all-countries-700k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-700k.jsonl", + "sha256": "5a864a1e9d89736147a8da594e2cbce5264979326d38655d0945d8447f3867b3" + }, + "smol-all-countries-800k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-800k.jsonl", + "sha256": "d85eb9c85a612fd7b77623e162ecd0f8265ba3be97054e26b9cff7c48735809b" + }, + "smol-all-countries-900k.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-900k.jsonl", + "sha256": "4fd6662e8b9bfcd9fad7d5dcd691a47ec985d810d1e340465c056ee84e9c40f3" + }, + "smol-all-countries-1M.jsonl": { + "local_location": null, + "format": "NdJson", + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/smol-all-countries/smol-all-countries-1M.jsonl", + "sha256": "585a713b489b154b94e7c07707bd369f888c7fe24eb90bf604578d7adf51a9e6" + } + }, + "precommands": [ + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "displayedAttributes": [ + "geonameid", + "name", + "asciiname", + "alternatenames", + "_geo", + "population" + ], + "searchableAttributes": [ + "name", + "alternatenames", + "elevation" + ], + "filterableAttributes": [ + "_geo", + "population", + "elevation" + ], + "sortableAttributes": [ + "_geo", + "population", + "elevation" + ], + "searchCutoffMs": 15000 + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-100k.jsonl" + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-200k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-300k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-400k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-500k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-600k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-700k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-800k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-900k.jsonl" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "smol-all-countries-1M.jsonl" + }, + "synchronous": "WaitForTask" + } + ], + "commands": [ + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "", + "limit": 100 + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "sort": [ + "_geoPoint(50.62999333378238, 3.086269263384099):asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "sort": [ + "_geoPoint(50.62999333378238, 3.086269263384099):desc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "sort": [ + "_geoPoint(35.749512532692144, 139.61664952543356):asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "sort": [ + "_geoPoint(35.749512532692144, 139.61664952543356):desc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "sort": [ + "_geoPoint(-48.87561645055408, -123.39275749319793):asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "sort": [ + "_geoPoint(-48.87561645055408, -123.39275749319793):desc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "filter": "_geoRadius(50.62999333378238, 3.086269263384099, 100000)" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "filter": "_geoRadius(50.62999333378238, 3.086269263384099, 1000)" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "filter": "_geoRadius(35.749512532692144, 139.61664952543356, 100000)" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "filter": "_geoRadius(35.749512532692144, 139.61664952543356, 1000)" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "filter": "_geoRadius(-48.87561645055408, -123.39275749319793, 100000)" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "filter": "_geoRadius(-48.87561645055408, -123.39275749319793, 1000)" + } + }, + "synchronous": "WaitForResponse" + } + ] +} \ No newline at end of file diff --git a/workloads/search/hackernews.json b/workloads/search/hackernews.json new file mode 100644 index 000000000..8d0a4b9b7 --- /dev/null +++ b/workloads/search/hackernews.json @@ -0,0 +1,255 @@ +{ + "name": "search-hackernews.ndjson_1M", + "run_count": 3, + "target": "search::=trace", + "extra_cli_args": [], + "assets": { + "hackernews-100_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-100_000.ndjson", + "sha256": "60ecd23485d560edbd90d9ca31f0e6dba1455422f2a44e402600fbb5f7f1b213" + }, + "hackernews-200_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-200_000.ndjson", + "sha256": "785b0271fdb47cba574fab617d5d332276b835c05dd86e4a95251cf7892a1685" + }, + "hackernews-300_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-300_000.ndjson", + "sha256": "de73c7154652eddfaf69cdc3b2f824d5c452f095f40a20a1c97bb1b5c4d80ab2" + }, + "hackernews-400_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-400_000.ndjson", + "sha256": "c1b00a24689110f366447e434c201c086d6f456d54ed1c4995894102794d8fe7" + }, + "hackernews-500_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-500_000.ndjson", + "sha256": "ae98f9dbef8193d750e3e2dbb6a91648941a1edca5f6e82c143e7996f4840083" + }, + "hackernews-600_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-600_000.ndjson", + "sha256": "b495fdc72c4a944801f786400f22076ab99186bee9699f67cbab2f21f5b74dbe" + }, + "hackernews-700_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-700_000.ndjson", + "sha256": "4b2c63974f3dabaa4954e3d4598b48324d03c522321ac05b0d583f36cb78a28b" + }, + "hackernews-800_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-800_000.ndjson", + "sha256": "cb7b6afe0e6caa1be111be256821bc63b0771b2a0e1fad95af7aaeeffd7ba546" + }, + "hackernews-900_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-900_000.ndjson", + "sha256": "e1154ddcd398f1c867758a93db5bcb21a07b9e55530c188a2917fdef332d3ba9" + }, + "hackernews-1_000_000.ndjson": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/hackernews/hackernews-1_000_000.ndjson", + "sha256": "27e25efd0b68b159b8b21350d9af76938710cb29ce0393fa71b41c4f3c630ffe" + } + }, + "precommands": [ + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "displayedAttributes": [ + "title", + "by", + "score", + "time" + ], + "searchableAttributes": [ + "title" + ], + "filterableAttributes": [ + "by" + ], + "sortableAttributes": [ + "score", + "time" + ], + "rankingRules": [ + "sort", + "words", + "typo", + "proximity", + "attribute", + "exactness" + ], + "searchCutoffMs": 15000 + } + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-100_000.ndjson" + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-200_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-300_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-400_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-500_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-600_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-700_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-800_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-900_000.ndjson" + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "hackernews-1_000_000.ndjson" + }, + "synchronous": "WaitForTask" + } + ], + "commands": [ + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "rust meilisearch", + "limit": 100, + "filter": "by = tpayet", + "sort": [ + "score:desc", + "time:asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "rust meilisearch", + "limit": 100, + "filter": "NOT by = tpayet", + "sort": [ + "score:desc", + "time:asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "meilisearch", + "limit": 100, + "sort": [ + "score:desc", + "time:desc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "rust", + "limit": 100, + "filter": "by = dang", + "sort": [ + "score:desc", + "time:asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "combinator YC", + "limit": 100, + "filter": "by = dang", + "sort": [ + "score:desc", + "time:asc" + ] + } + }, + "synchronous": "WaitForResponse" + } + ] +} \ No newline at end of file diff --git a/workloads/search/movies.json b/workloads/search/movies.json new file mode 100644 index 000000000..939fe6111 --- /dev/null +++ b/workloads/search/movies.json @@ -0,0 +1,90 @@ +{ + "name": "search-movies.json", + "run_count": 10, + "target": "search::=trace", + "extra_cli_args": [], + "assets": { + "movies.json": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/movies.json", + "sha256": "5b6e4cb660bc20327776e8a33ea197b43d9ec84856710ead1cc87ab24df77de1" + } + }, + "precommands": [ + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres", + "release_date" + ], + "sortableAttributes": [ + "release_date" + ], + "searchCutoffMs": 15000 + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "movies.json" + }, + "synchronous": "WaitForTask" + } + ], + "commands": [ + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "", + "limit": 100 + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "Batman returns", + "limit": 100 + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "q": "the" + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "limit": 100, + "q": "t" + } + }, + "synchronous": "WaitForResponse" + } + ] +} \ No newline at end of file diff --git a/workloads/search/sortable-movies.json b/workloads/search/sortable-movies.json new file mode 100644 index 000000000..5174b0ec1 --- /dev/null +++ b/workloads/search/sortable-movies.json @@ -0,0 +1,110 @@ +{ + "name": "search-sortable-movies.json", + "run_count": 10, + "target": "search::=trace", + "extra_cli_args": [], + "assets": { + "movies.json": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/movies.json", + "sha256": "5b6e4cb660bc20327776e8a33ea197b43d9ec84856710ead1cc87ab24df77de1" + } + }, + "precommands": [ + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres", + "release_date" + ], + "sortableAttributes": [ + "release_date" + ], + "rankingRules": [ + "sort", + "words", + "typo", + "proximity", + "attribute", + "exactness" + ], + "searchCutoffMs": 15000 + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "movies.json" + }, + "synchronous": "WaitForTask" + } + ], + "commands": [ + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "", + "limit": 100, + "sort": [ + "release_date:asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "Batman returns", + "limit": 100, + "sort": [ + "release_date:desc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "the", + "limit": 100, + "sort": [ + "release_date:asc" + ] + } + }, + "synchronous": "WaitForResponse" + }, + { + "route": "indexes/movies/search", + "method": "POST", + "body": { + "inline": { + "q": "t", + "limit": 100, + "sort": [ + "release_date:asc" + ] + } + }, + "synchronous": "WaitForResponse" + } + ] +} \ No newline at end of file