{"action":"created","issue":{"url":"https://api.github.com/repos/sul-dlss/spotlight/issues/1152","labels_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/1152/labels{/name}","comments_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/1152/comments","events_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/1152/events","html_url":"https://github.com/sul-dlss/spotlight/issues/1152","id":75656979,"number":1152,"title":"Document persistence behavior and cooperation with other applications to avoid clobbering each others Solr updates","user":{"login":"escowles","id":856924,"avatar_url":"https://avatars.githubusercontent.com/u/856924?v=3","gravatar_id":"","url":"https://api.github.com/users/escowles","html_url":"https://github.com/escowles","followers_url":"https://api.github.com/users/escowles/followers","following_url":"https://api.github.com/users/escowles/following{/other_user}","gists_url":"https://api.github.com/users/escowles/gists{/gist_id}","starred_url":"https://api.github.com/users/escowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escowles/subscriptions","organizations_url":"https://api.github.com/users/escowles/orgs","repos_url":"https://api.github.com/users/escowles/repos","events_url":"https://api.github.com/users/escowles/events{/privacy}","received_events_url":"https://api.github.com/users/escowles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-12T16:23:02Z","updated_at":"2015-05-12T16:44:35Z","closed_at":null,"body":"In https://github.com/projecthydra/active_fedora/issues/778, a proposal was made to update the Solr configuration to use only stored fields by default to enable atomic Solr updates.  Spotlight was one of the use cases mentioned for this, so it would be good to know how Spotlight updates the Solr index, if Spotlight can be used without atomic updates (and what the impact of disabling them would be), and how other applications updating the Solr index interact with Spotlight to avoid data loss.\r\n\r\n#316 and #315 seem relevant, but look like the are only proposals."},"comment":{"url":"https://api.github.com/repos/sul-dlss/spotlight/issues/comments/101344683","html_url":"https://github.com/sul-dlss/spotlight/issues/1152#issuecomment-101344683","issue_url":"https://api.github.com/repos/sul-dlss/spotlight/issues/1152","id":101344683,"user":{"login":"cbeer","id":111218,"avatar_url":"https://avatars.githubusercontent.com/u/111218?v=3","gravatar_id":"","url":"https://api.github.com/users/cbeer","html_url":"https://github.com/cbeer","followers_url":"https://api.github.com/users/cbeer/followers","following_url":"https://api.github.com/users/cbeer/following{/other_user}","gists_url":"https://api.github.com/users/cbeer/gists{/gist_id}","starred_url":"https://api.github.com/users/cbeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbeer/subscriptions","organizations_url":"https://api.github.com/users/cbeer/orgs","repos_url":"https://api.github.com/users/cbeer/repos","events_url":"https://api.github.com/users/cbeer/events{/privacy}","received_events_url":"https://api.github.com/users/cbeer/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T16:44:35Z","updated_at":"2015-05-12T16:44:35Z","body":"Indeed, they are only proposals. Ideally, someone who actually wants those features will champion them.\r\n\r\nThe basic model is an application should mixin an indexing strategy to their `SolrDocument` that provides a `#reindex` method, e.g. https://github.com/sul-dlss/spotlight/blob/master/app/models/concerns/spotlight/solr_document/atomic_updates.rb#L6-10\r\n\r\nWe've also provided a couple basic endpoints that may be good starting points, including:\r\n\r\n - a shim that behaves like Solr (for some definition of \"like Solr\"): https://github.com/sul-dlss/spotlight/blob/master/app/controllers/spotlight/solr_controller.rb\r\n\r\n- an endpoint to retrieve Spotlight's exhibit-specific data for a document: https://github.com/sul-dlss/spotlight/blob/master/app/controllers/spotlight/catalog_controller.rb#L219-222 (E.g. `/catalog/:id.solr_json`)\r\n\r\n\r\n"}}