{"id":15640653,"url":"https://github.com/pat/ts-delayed-delta","last_synced_at":"2025-04-06T20:10:34.542Z","repository":{"id":712300,"uuid":"359107","full_name":"pat/ts-delayed-delta","owner":"pat","description":"Manage delta indexes via Delayed Job for Thinking Sphinx","archived":false,"fork":false,"pushed_at":"2020-03-03T02:01:56.000Z","size":100,"stargazers_count":73,"open_issues_count":0,"forks_count":33,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T18:09:36.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://ts.freelancing-gods.com","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/pat.png","metadata":{"files":{"readme":"README.textile","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}},"created_at":"2009-11-03T08:24:59.000Z","updated_at":"2023-03-02T14:56:26.000Z","dependencies_parsed_at":"2022-07-14T17:17:46.834Z","dependency_job_id":null,"html_url":"https://github.com/pat/ts-delayed-delta","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fts-delayed-delta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fts-delayed-delta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fts-delayed-delta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pat%2Fts-delayed-delta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pat","download_url":"https://codeload.github.com/pat/ts-delayed-delta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543591,"owners_count":20955865,"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-10-03T11:39:15.880Z","updated_at":"2025-04-06T20:10:34.514Z","avatar_url":"https://github.com/pat.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. Delayed Deltas for Thinking Sphinx\n\nh2. Installation\n\nThis version works with Thinking Sphinx v1.5.0, v2.1.0 and v3.x.\n\nIn your @Gemfile@, it'll likely look something like this:\n\n\u003cpre\u003e\u003ccode\u003egem 'ts-delayed-delta', '~\u003e 2.1'\u003c/code\u003e\u003c/pre\u003e\n\nOr, if you're referring directly to the git repository:\n\n\u003cpre\u003e\u003ccode\u003egem 'ts-delayed-delta',\n  :git    =\u003e 'git://github.com/pat/ts-delayed-delta.git',\n  :branch =\u003e 'master',\n  :ref    =\u003e 'use-latest-commit-here'\u003c/code\u003e\u003c/pre\u003e\n\nAnd given this gem's built for Delayed Job, we're presuming you've got that set up (with the database table), and you know how to run it. This gem no longer provides a custom task for that purpose - there's no need.\n\nh2. Usage\n\nIn your index definitions, make sure you set the @:delta@ setting to @ThinkingSphinx::Deltas::DelayedDelta@:\n\n\u003cpre\u003e\u003ccode\u003eThinkingSphinx::Index.define :book, :with =\u003e :active_record, :delta =\u003e ThinkingSphinx::Deltas::DelayedDelta do\n  # ...\nend\u003c/code\u003e\u003c/pre\u003e\n\nFor those still on pre-v3 versions of Thinking Sphinx, the delta option goes within the define_index block:\n\n\u003cpre\u003e\u003ccode\u003edefine_index do\n  # ...\n\n  set_property :delta =\u003e ThinkingSphinx::Deltas::DelayedDelta\nend\u003c/code\u003e\u003c/pre\u003e\n\nIf you've never used delta indices before, you'll want to add the boolean column named delta to each model that is using the approach. It probably doesn't hurt to add an index to that column as well.\n\n\u003cpre\u003e\u003ccode\u003eadd_column :books, :delta, :boolean, :default =\u003e true, :null =\u003e false\nadd_index  :books, :delta\u003c/code\u003e\u003c/pre\u003e\n\nAnd that's pretty much it. Make sure Delayed Job is running, and it'll take care of the jobs to keep your Sphinx indices up to date.\n\nPlease keep in mind that you need to run the Delayed Job workers on the same machine as Sphinx, as direct access to Sphinx files (and the Sphinx command-line tools) is essential.\n\nh2. Contributing\n\nContributions are very much welcome - but keep in mind the following:\n\n* Keep patches in a separate branch\n* Don't mess with the version number. I'll take care of that when the patch is merged in.\n* Please write tests - currently, there's only acceptance tests in place, because the underlying code is simple enough. If you get stuck into anything complex, unit tests are a smart move.\n\nh2. Contributors\n\n* \"Ryan Schlesinger\":http://github.com/ryansch (Allowing installs as a plugin)\n* \"Maximilian Schulz\":http://max.jungeelite.de (Ensuring compatibility with Bundler)\n* \"Edgars Beigarts\":http://github.com/ebeigarts (Adding intelligent description for tasks)\n* \"Alexander Simonov\":http://simonov.me/ (Explicit table definition)\n* \"David Goodlad\":http://david.goodlad.ca/ (Delayed Job/ActiveRecord load order fix)\n* \"Ben Hutton\":http://www.benhutton.com/ (Delayed Job compatibility update)\n* \"Reinier de Lange\":http://www.nedforce.nl/ (Fix for table name reference)\n* \"Enrico Brunetta\":http://github.com/enrico (Adding Railtie for Rails 3)\n* \"Jonathan Viney\":https://github.com/jviney and \"James Healy\":http://yob.id.au/ (Rails 3.2 deprecation fixes)\n* \"Georg Ledermann\":http://www.georg-ledermann.de (DJ 2.0.x backwards compatibility)\n* \"Jonathan Lim\":http://snowblink.co.uk (Cleaning up version references)\n* \"Manjunath Manohar\":https://github.com/manjunath-nm89 (Allow setting of job queue, smarter cleaning up of jobs)\n* \"Mikko Koski\":https://github.com/rap1ds (Ensure new jobs are created if all existing jobs are failures)\n* \"Jason Barnabe\":https://github.com/JasonBarnabe (Fix Rails 5.x compatibility)\n\nh2. Copyright\n\nCopyright (c) 2009-2018, Thinking Sphinx Delayed Deltas (ts-delayed-delta) is developed and maintained by Pat Allan, and is released under the open MIT Licence. Many thanks to \"all who have contributed patches\":https://github.com/pat/ts-delayed-delta/contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Fts-delayed-delta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpat%2Fts-delayed-delta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpat%2Fts-delayed-delta/lists"}