{"id":20556641,"url":"https://github.com/clevertech/yiisolr","last_synced_at":"2025-04-14T13:08:30.153Z","repository":{"id":145694521,"uuid":"1509923","full_name":"clevertech/yiisolr","owner":"clevertech","description":"YiiSolr is a very simple wrapper to the PHP Apache Solr Extension (http://php.net/manual/en/book.solr.php) that allows you to communicate effectively with the Apache Solr server in PHP 5 in your Yii Applications. ","archived":false,"fork":false,"pushed_at":"2011-03-22T05:12:30.000Z","size":100,"stargazers_count":12,"open_issues_count":1,"forks_count":6,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T02:12:47.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/clevertech.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":"2011-03-22T04:08:43.000Z","updated_at":"2023-02-19T17:35:47.000Z","dependencies_parsed_at":"2023-06-26T02:10:09.905Z","dependency_job_id":null,"html_url":"https://github.com/clevertech/yiisolr","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/clevertech%2Fyiisolr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clevertech%2Fyiisolr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clevertech%2Fyiisolr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clevertech%2Fyiisolr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clevertech","download_url":"https://codeload.github.com/clevertech/yiisolr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886317,"owners_count":21177643,"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-16T03:31:03.293Z","updated_at":"2025-04-14T13:08:30.014Z","avatar_url":"https://github.com/clevertech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Introduction\n============\n\nYiiSolr is a very simple wrapper to the [PHP Apache Solr Extension](http://php.net/manual/en/book.solr.php) that allows you to communicate effectively with the Apache Solr server in PHP 5 in your Yii Applications. \n\nThis extension has also been written to conform to the interface defined by another Yii Solr extension, [Solr](http://www.yiiframework.com/extension/solr), which uses the [solr-php-client](http://code.google.com/p/solr-php-client/) library to connect with Solr. So, this extension gives you another choice in client libraries with which to connect to Solr. And you can write the same code against either extension so changing your Solr connection implementation should is easy.\n\n\nInitial Installation\n====================\nYou can either download the source files or clone from:\n\ngit://github.com/clevertech/yiisolr.git\n\nThen just add them to the extensions folder under your Yii application.\n\nConfiguration\n=============\nThe class YSolrConnection is defined as a Yii application component, so can be configured as such as part of your application configuration in the 'components' definitions:\n\n\t'solrManager'=\u003earray(\n\t\t'class'=\u003e'ext.yiisolr.YSolrConnection',\n\t\t'host' =\u003e 'localhost',\n\t\t'port' =\u003e 8983,\n\t\t'username' =\u003e '',\n\t\t'password' =\u003e '',\n\t\t'indexPath' = '/solr',\n\t),\n\t\nSee the public properties of the YSolrConnection class for more settings that can be defined in this configuration.\n\nExample Usage:\n==============\n\n\t//Adding one document to your index\n\tYii::app()-\u003esolrManager-\u003eupdateOne(array('id'=\u003e1,'title'=\u003e'Test Title One'));\n\t\n\t\n\t//Adding many documents to your index at once\n\t$data = array(\n\t\tarray('id'=\u003e1,'title'=\u003e'Test Title One'),\n\t\tarray('id'=\u003e2,'title'=\u003e'Test Title Two'),\n\t\tarray('id'=\u003e3,'title'=\u003e'Test Title Three')\n\t);\n\tYii::app()-\u003esolrManager-\u003eupdateMany($data));\n\t\n\t\n\t//To search for these added documents\n\t$result = Yii::app()-\u003esolrManager-\u003eget('title:Test', 0, 20);\n\t//get the number of returned results\n\techo \"Number of results returned: \".$result-\u003eresponse-\u003enumFound;\n\t//iterate over the returned docs array to get information from each document\n\tforeach($result-\u003eresponse-\u003edocs as $doc)\n\t{\n\t   echo \"{$doc-\u003etitle} \u003cbr\u003e\";\n\t}\n\t\n\nComponents\n==========\n\nThis extension as two main classes:\n\nYSolrConnection class\n---------------------\n\nProvides an easy to use interface to making Solr queries using the PHP Apache Solr extension. \n\nYSolrSearchResponse class\n-------------------------\n\nEncapsulates the response data and provides and easy to use interface to retrieve the documents.\n\n\nResources\n=========\n\n[PHP Apache Solr Extension](http://php.net/manual/en/book.solr.php)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclevertech%2Fyiisolr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclevertech%2Fyiisolr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclevertech%2Fyiisolr/lists"}