{"id":19538503,"url":"https://github.com/indoqa/solr-spring-server","last_synced_at":"2025-02-26T04:30:21.989Z","repository":{"id":29761247,"uuid":"33305009","full_name":"Indoqa/solr-spring-server","owner":"Indoqa","description":"A Spring FactoryBean for Solr 4.x servers.","archived":false,"fork":false,"pushed_at":"2023-10-19T08:57:22.000Z","size":30,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-08T18:17:33.706Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Indoqa.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,"publiccode":null,"codemeta":null}},"created_at":"2015-04-02T11:20:10.000Z","updated_at":"2023-10-19T07:26:24.000Z","dependencies_parsed_at":"2023-01-14T15:36:23.249Z","dependency_job_id":"9961a583-d196-440d-bc21-17f00b0ac93f","html_url":"https://github.com/Indoqa/solr-spring-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indoqa%2Fsolr-spring-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indoqa%2Fsolr-spring-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indoqa%2Fsolr-spring-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Indoqa%2Fsolr-spring-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Indoqa","download_url":"https://codeload.github.com/Indoqa/solr-spring-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240794268,"owners_count":19858713,"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-11T02:35:04.727Z","updated_at":"2025-02-26T04:30:21.949Z","avatar_url":"https://github.com/Indoqa.png","language":"Java","readme":"# Indoqa Solr Spring Server\n\nThis project offers a Spring based implementation of a FactoryBean for communicating with Apache Solr servers. \n\nThe SolrServerFactory allows to communicate with Solr either embedded, via http or Apache ZooKeeper for SolrCloud installations.\n\nThe desired behavior is configured with the supplied url:\n\n* file:// - uses the EmbeddedSolrServer\n* http:// - uses the HttpSolrServer\n* cloud:// - uses the CloudSolrServer\n\n\n## Installation\n\n### Requirements\n\n  * Apache Solr 4.10+\n  * Spring Beans 3.1+\n  * Java 6+\n  \n### Build\n\n  * Download the latest release via maven\n\n```xml\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.indoqa.solr\u003c/groupId\u003e\n      \u003cartifactId\u003espring-server\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n    \n```\n\n  * Download source\n  * run \"maven clean install\"\n  \n## Configuration\n\n### Initialize the SolrServerFactory for tests with this snippet\n```java\n\n    SolrServerFactory solrServerFactory = new SolrServerFactory();\n    solrServerFactory.setUrl(\"file:///tmp/solr-spring-server/embedded-test-core\");\n    solrServerFactory.setEmbeddedSolrConfigurationDir(\"./src/test/resources/solr/test-core\");\n    solrServerFactory.initialize();\n\n    SolrServer solrServer = solrServerFactory.getObject();\n\n    QueryResponse response = solrServer.query(new SolrQuery(\"*:*\"));\n\n    ...\n\n    solrServer.shutdown();\n    solrServerFactory.destroy();\n\n```\nThe url can either be a relative or absolute directory, the embeddedSolrConfigurationDir must include the usual Solr configuration files:\n\n* schema.xml\n* solrconfig.xml\n\n### To communicate with a single Solr server use this snippet\n\n```java\n\n    SolrServerFactory solrServerFactory = new SolrServerFactory();\n    solrServerFactory.setUrl(\"http://localhost:8983/test-core\");\n    solrServerFactory.initialize();\n```\n\n### To communicate with a SolrCloud cluster use this snippet\n\n ```java\n\n    SolrServerFactory solrServerFactory = new SolrServerFactory();\n    solrServerFactory.setUrl(\"cloud://zkHost1:2181,zkHost2:2182?collection=test-collection\");\n    solrServerFactory.initialize();\n\n```\nThe syntax uses zkHost1:2181,zkHost2:2182 for the ZooKeeper instances in your ZooKeeper ensemble, followed by the collection to be used. \nThis ensures that the communication for update requests will be established against the leader of the collection to minimize communication overhead.\n\n### Solr Spring server integration based on xml configuration\n\n ```xml\n\n    \u003cbean name=\"solrServerFactory\" class=\"com.indoqa.solr.server.factory.SolrServerFactory\"\u003e\n      \u003cproperty name=\"url\" value=\"file://./target/solr/embedded-test-core\" /\u003e\n      \u003cproperty name=\"embeddedSolrConfigurationDir\" value=\"./src/test/resources/solr/test-core\" /\u003e\n    \u003c/bean\u003e\n\n ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findoqa%2Fsolr-spring-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findoqa%2Fsolr-spring-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findoqa%2Fsolr-spring-server/lists"}