{"id":18711866,"url":"https://github.com/algolia/algolia-index-transform","last_synced_at":"2025-06-19T15:42:14.032Z","repository":{"id":57175937,"uuid":"111900338","full_name":"algolia/algolia-index-transform","owner":"algolia","description":"Transform an index using map, reduce or filter and push to a brand new index.","archived":false,"fork":false,"pushed_at":"2023-03-03T09:54:41.000Z","size":29,"stargazers_count":13,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-02T22:39:56.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/algolia.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-24T09:29:14.000Z","updated_at":"2021-01-12T15:37:34.000Z","dependencies_parsed_at":"2025-04-12T12:32:01.082Z","dependency_job_id":"dd77094d-f36a-4dcb-a9f3-b6252a5e7cc9","html_url":"https://github.com/algolia/algolia-index-transform","commit_stats":null,"previous_names":["therealwebby/algolia-index-transform"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/algolia/algolia-index-transform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Falgolia-index-transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Falgolia-index-transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Falgolia-index-transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Falgolia-index-transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algolia","download_url":"https://codeload.github.com/algolia/algolia-index-transform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Falgolia-index-transform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260781391,"owners_count":23062231,"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-07T12:40:42.449Z","updated_at":"2025-06-19T15:42:08.997Z","avatar_url":"https://github.com/algolia.png","language":"JavaScript","readme":"# Algolia Index Transform\n\nA selection of methods to transform an index using `map`, `reduce` or `filter`.\nand push to a brand new index.\n\n### Install\n\n##### Node Using NPM\n\n`npm install algolia-index-transform`\n\n##### Node Using yarn\n\n`yarn add algolia-index-transform`\n\n### Set Up\n\nOnce installed, you will need to initalize the Algolia Index Transform as below.\nEach property is required.\n\n```js\nconst AlgoliaIndexTransform = require('algolia-index-transform');\n\nconst algoliaIndexTransform = new AlgoliaIndexTransform({\n  sourceApplicationID: 'xxxxxxxxxx',\n  sourceApiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',\n  sourceIndexName: 'an existing index',\n  destinationApplicationID: 'xxxxxxxxxx',\n  destinationApiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',\n  destinationIndexName: 'a new index',\n  limit: 20000,\n  requestOptions: {\n    attributesToRetrieve: ['*']\n  },\n  copySettings: false\n});\n```\n\n### Setting properties\n\n| Paramater                   | Type      | Description                                                                                                                                                                        |\n| :-------------------------- | :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `sourceApplicationID`       | `String`  | The Application ID where the current index resides                                                                                                                                 |\n| `sourceApiKey`              | `String`  | The API Key for the app where the current index resides                                                                                                                            |\n| `sourceIndexName`           | `String`  | The index name of the current index                                                                                                                                                |\n| `destinationApplicationID`  | `String`  | The Application ID of where you would like to add the index                                                                                                                        |\n| `destinationApiKey`         | `String`  | The API Key for the new index                                                                                                                                                      |\n| `destinationIndexName`      | `String`  | The new index name                                                                                                                                                                 |\n| `limit` (Optional)          | `Number`  | Optional: Limit the amount of records to transfer                                                                                                                                  |\n| `requestOptions` (Optional) | `Object`  | Optional: Object containing request options for [browseAll](https://www.algolia.com/doc/api-reference/api-methods/browse/?language=javascript#browse-compatible-search-parameters) |\n| `copySettings` (Optional)   | `Boolean` | Optional: Copy destination settings with the transformation                                                                                                                        |\n\n### Usage\n\n#### Copy\n\n```js\nalgoliaIndexTransform.copy();\n```\n\n#### Map\n\n```js\nalgoliaIndexTransform.map(item =\u003e ({\n  id: item.id\n}));\n```\n\n#### Filter\n\n```js\nalgoliaIndexTransform.filter(item =\u003e item.popular === true);\n```\n\n#### Reduce\n\n```js\nalgoliaIndexTransform.reduce((acc, cur) =\u003e acc + cur);\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgolia%2Falgolia-index-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgolia%2Falgolia-index-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgolia%2Falgolia-index-transform/lists"}