{"id":16380998,"url":"https://github.com/anthonator/delayed_sunspot","last_synced_at":"2025-08-04T07:09:46.054Z","repository":{"id":5343143,"uuid":"6528875","full_name":"anthonator/delayed_sunspot","owner":"anthonator","description":"Delayed Job support for Sunspot","archived":false,"fork":false,"pushed_at":"2012-11-05T06:55:51.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-28T12:42:11.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/anthonator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-04T09:24:04.000Z","updated_at":"2023-03-17T12:02:50.000Z","dependencies_parsed_at":"2022-09-19T05:01:46.717Z","dependency_job_id":null,"html_url":"https://github.com/anthonator/delayed_sunspot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/anthonator/delayed_sunspot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fdelayed_sunspot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fdelayed_sunspot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fdelayed_sunspot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fdelayed_sunspot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonator","download_url":"https://codeload.github.com/anthonator/delayed_sunspot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonator%2Fdelayed_sunspot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267368883,"owners_count":24076089,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-11T03:53:06.278Z","updated_at":"2025-08-04T07:09:46.006Z","avatar_url":"https://github.com/anthonator.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DelayedSunspot [![endorse](http://api.coderwall.com/anthonator/endorsecount.png)](http://coderwall.com/anthonator)\n\nAdds support for indexing objects asynchronously using [Sunspot](https://github.com/sunspot/sunspot) and [Delayed Job](https://github.com/collectiveidea/delayed_job).\n\n[![Build Status](https://secure.travis-ci.org/anthonator/delayed_sunspot.png)](http://travis-ci.org/anthonator/delayed_sunspot)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'delayed_sunspot'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install delayed_sunspot\n\n## Usage\n\nYou will need to configure Sunspot to use delayed_sunspot's session proxy in order to push Sunspot commands through Delayed Job.\n\n```ruby\nSunspot.session = Sunspot::SessionProxy::DelayedJobSessionProxy.new(Sunspot.session)\n```\n\nIf you're using Rails put the above line of code in an initializer.\n\n## ZOMG! WHY AREN'T MY OBJECTS BEING INDEXED?!\n\nIf you're using the sunspot_rails gem you might have noticed that the objects you've been indexing aren't coming back in your search results. This is due to the sunspot_rails gem being configured to autocommit indexes through a controller hook. This functionality doesn't exist when indexing outside of a controller.\n\nYou can enable autocommit by putting the following code in your solrconfig.xml under the updateHandler section:\n\n```xml\n\u003cautoCommit\u003e\n    \u003cmaxDocs\u003e10000\u003c/maxDocs\u003e \u003c!-- maximum uncommited docs before autocommit triggered --\u003e\n    \u003cmaxTime\u003e15000\u003c/maxTime\u003e \u003c!-- maximum time (in MS) after adding a doc before an autocommit is triggered --\u003e\n\u003c/autoCommit\u003e\n```\n\nTo find out more about autocommits [read the Solr documentation](http://wiki.apache.org/solr/SolrConfigXml#Update_Handler_Section)\n\nIf you've already configured Solr for autocommits you're good to go.\n\n## Asynchronous Commands\n\nbatch  \ncommit  \ncommit_if_delete_dirty  \ncommit_if_dirty  \nindex  \nindex!  \nremove  \nremove!  \nremove_all  \nremove_all!  \nremove_by_id  \nremove_by_id!  \n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonator%2Fdelayed_sunspot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonator%2Fdelayed_sunspot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonator%2Fdelayed_sunspot/lists"}