{"id":18773114,"url":"https://github.com/webfactory/content-mapping-destinationadapter-solarium-bundle","last_synced_at":"2025-04-13T09:07:33.690Z","repository":{"id":36051706,"uuid":"40349600","full_name":"webfactory/content-mapping-destinationadapter-solarium-bundle","owner":"webfactory","description":"Symfony bundle for the solarium DestinationAdapter inside the webfactory/content-mapping mini framework.","archived":false,"fork":false,"pushed_at":"2023-06-07T07:09:10.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-03-20T17:23:44.335Z","etag":null,"topics":["bundle","content-mapping","php","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webfactory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2015-08-07T08:21:20.000Z","updated_at":"2024-04-15T09:45:37.166Z","dependencies_parsed_at":"2024-04-15T09:45:36.312Z","dependency_job_id":"b87dbe58-3d5d-44cd-b159-e17e98bd2580","html_url":"https://github.com/webfactory/content-mapping-destinationadapter-solarium-bundle","commit_stats":{"total_commits":20,"total_committers":3,"mean_commits":6.666666666666667,"dds":"0.44999999999999996","last_synced_commit":"092d54ed29dba4eedd78abc432abcf611e1ebfd3"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fcontent-mapping-destinationadapter-solarium-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fcontent-mapping-destinationadapter-solarium-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fcontent-mapping-destinationadapter-solarium-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fcontent-mapping-destinationadapter-solarium-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webfactory","download_url":"https://codeload.github.com/webfactory/content-mapping-destinationadapter-solarium-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688567,"owners_count":21145766,"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":["bundle","content-mapping","php","symfony"],"created_at":"2024-11-07T19:32:50.008Z","updated_at":"2025-04-13T09:07:33.658Z","avatar_url":"https://github.com/webfactory.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# content-mapping-destinationadapter-solarium-bundle \n\nSymfony bundle for [webfactory/content-mapping-destinationadapter-solarium](https://github.com/webfactory/content-mapping-destinationadapter-solarium),\neasing your synchronization life via simple configuration, a services and a console command.\n\n\n## Installation \n\nInstall the package via composer:\n\n    composer require webfactory/content-mapping-destinationadapter-solarium-bundle\n\nand enable two bundles in your app kernel:\n    \n```php\n\u003c?php\n// app/AppKernel.php\n\npublic function registerBundles()\n{\n    // ...\n    $bundles[] = new Webfactory\\ContentMappingDestinationAdapterSolariumBundle\\WebfactoryContentMappingDestinationAdapterSolariumBundle();\n    $bundles[] = new Nelmio\\SolariumBundle\\NelmioSolariumBundle();\n    // ...\n}\n```\n\nand finally, configure the endpoint for the Solarium client (currently, only the default client with the default\nendpoint is supported): \n\n```yml\n// app/config.yml\n\nnelmio_solarium:\n    endpoints:\n        default:\n            dsn: http://localhost:8983/solr/your-core\n\n# for SolariumBundle 3.x (beta)            \nnelmio_solarium:\n    endpoints:\n        default:\n            host: localhost\n            port: 8983\n            core: your-core\n```\n\n\n## Usage \n\nThe bundle provides a service called `contentmapping.destinationadapter.solarium` which you can use to define a\nSynchronizer service inside the [webfactory/content-mapping](https://github.com/webfactory/content-mapping) mini\nframework:\n\n```xml\n\u003c!-- Resources/config/services.xml --\u003e\n\n\u003c!-- Synchronizer for MyEntity ---\u003e\n\u003cservice class=\"Webfactory\\ContentMapping\\Synchronizer\"\u003e\n    \u003c!-- SourceAdapter --\u003e\n    \u003cargument type=\"service\"\u003e\n        \u003cservice class=\"Webfactory\\ContentMapping\\SourceAdapter\\Doctrine\\GenericDoctrineSourceAdapter\"\u003e\n            \u003c!-- Doctrine Repository --\u003e\n            \u003cargument type=\"service\"\u003e\n                \u003cservice class=\"MyVendor\\MyBundle\\Entity\\MyEntityRepository\" factory-service=\"doctrine.orm.entity_manager\" factory-method=\"getRepository\"\u003e\n                    \u003cargument\u003eMyVendorMyEntityBundle:MyEntity\u003c/argument\u003e\n                \u003c/service\u003e\n            \u003c/argument\u003e\n            \u003c!-- Name of the repository method to query --\u003e\n            \u003cargument type=\"string\"\u003efindForSolrIndex\u003c/argument\u003e\n        \u003c/service\u003e\n    \u003c/argument\u003e\n\n    \u003c!-- Mapper --\u003e\n    \u003cargument type=\"service\"\u003e\n        \u003cservice class=\"MyVendor\\MyBundle\\ContentMapping\\MyEntityMapper\" /\u003e\n    \u003c/argument\u003e\n\n    \u003c!-- DestinationAdapter --\u003e\n    \u003cargument type=\"service\" id=\"contentmapping.destinationadapter.solarium\"/\u003e\n\n    \u003c!-- PSR3-logger --\u003e\n    \u003cargument type=\"service\" id=\"logger\" /\u003e\n    \u003ctag name=\"monolog.logger\" channel=\"solr\" /\u003e\n    \n    \u003c!-- Tag to mark the service as a Synchronizer --\u003e\n    \u003ctag name=\"contentmapping.synchronizer\" objectclass=\"\\JugendFuerEuropa\\Bundle\\JugendInAktionBundle\\Entity\\Mitarbeiter\" /\u003e\n\u003c/service\u003e\n\n\u003c!-- other Synchronizers ---\u003e\n```\n\nAs a bonus, this bundle provides you with a console command for deleting data from the solr index matching a query:\n\n    app/bin content-mapping:solarium:delete-from-index [query=*:*]\n\n\n## Credits, Copyright and License \n\nThis project was started at webfactory GmbH, Bonn.\n\n- \u003chttps://www.webfactory.de\u003e\n- \u003chttps://twitter.com/webfactory\u003e\n\nCopyright 2015-2022 webfactory GmbH, Bonn. Code released under [the MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfactory%2Fcontent-mapping-destinationadapter-solarium-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebfactory%2Fcontent-mapping-destinationadapter-solarium-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfactory%2Fcontent-mapping-destinationadapter-solarium-bundle/lists"}