{"id":21994521,"url":"https://github.com/codelibs/elasticsearch-abtest","last_synced_at":"2025-04-30T17:01:40.784Z","repository":{"id":145323494,"uuid":"44003401","full_name":"codelibs/elasticsearch-abtest","owner":"codelibs","description":null,"archived":false,"fork":false,"pushed_at":"2015-10-16T02:37:28.000Z","size":140,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T18:04:35.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codelibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-10T09:08:46.000Z","updated_at":"2019-01-29T07:29:21.000Z","dependencies_parsed_at":"2023-04-10T07:27:22.442Z","dependency_job_id":null,"html_url":"https://github.com/codelibs/elasticsearch-abtest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Felasticsearch-abtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Felasticsearch-abtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Felasticsearch-abtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codelibs%2Felasticsearch-abtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codelibs","download_url":"https://codeload.github.com/codelibs/elasticsearch-abtest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251748929,"owners_count":21637413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T21:09:33.637Z","updated_at":"2025-04-30T17:01:40.548Z","avatar_url":"https://github.com/codelibs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elasticsearch-abtest\n\n## Overview\n\nAbTestPlugin provide simple A/B testing for search request. This plugin rewrite a search target index by [ab_rt] parameter automatically.\n\n## Usage\n\n### Setup test settings\n\n```\ncurl -XPOST localhost:9201/sample-index/_abtest/settings -d '\n{\n  \"testcases\": [\n    {\n      \"test_name\": \"test1\",\n      \"index\": \"sample-index-a\",\n      \"percentage\": 10\n    },\n    {\n      \"test_name\": \"test2\",\n      \"index\": \"sample-index-b\",\n      \"percentage\": 20\n    }\n  ]\n}'\n```\n\n### Executing test\n\nA search target index is rewritten by ab_rt parameter. In the above case, if ab_rt parameter is 0-9, target index is rewritten sample-index-a.\n\nSearch sample-index\n```\ncurl -XPOST localhost:9200/sample-index/doc/_search?q=*:*\n```\n\nSearch sample-index-a (ab_rt is 0-9)\n```\ncurl -XPOST localhost:9200/sample-index/doc/_search?q=*:*\u0026ab_rt=5\u0026hash_rt=false\n```\n\nSearch sample-index-b (ab_rt is 10-29)\n```\ncurl -XPOST localhost:9200/sample-index/doc/_search?q=*:*\u0026ab_rt=20\u0026hash_rt=false\n```\n\nIf you set \"true\" to hash_rt parameter, ab_rt parameter value is converted to hashCode.(default)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Felasticsearch-abtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodelibs%2Felasticsearch-abtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodelibs%2Felasticsearch-abtest/lists"}