{"action":"created","issue":{"url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/116","labels_url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/116/comments","events_url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/116/events","html_url":"https://github.com/OpenConceptLab/oclapi/issues/116","id":75634559,"number":116,"title":"Creating a new source versions causes concepts to completely crap out","user":{"login":"paynejd","id":1189689,"avatar_url":"https://avatars.githubusercontent.com/u/1189689?v=3","gravatar_id":"","url":"https://api.github.com/users/paynejd","html_url":"https://github.com/paynejd","followers_url":"https://api.github.com/users/paynejd/followers","following_url":"https://api.github.com/users/paynejd/following{/other_user}","gists_url":"https://api.github.com/users/paynejd/gists{/gist_id}","starred_url":"https://api.github.com/users/paynejd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paynejd/subscriptions","organizations_url":"https://api.github.com/users/paynejd/orgs","repos_url":"https://api.github.com/users/paynejd/repos","events_url":"https://api.github.com/users/paynejd/events{/privacy}","received_events_url":"https://api.github.com/users/paynejd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenConceptLab/oclapi/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"MisterNando","id":1670990,"avatar_url":"https://avatars.githubusercontent.com/u/1670990?v=3","gravatar_id":"","url":"https://api.github.com/users/MisterNando","html_url":"https://github.com/MisterNando","followers_url":"https://api.github.com/users/MisterNando/followers","following_url":"https://api.github.com/users/MisterNando/following{/other_user}","gists_url":"https://api.github.com/users/MisterNando/gists{/gist_id}","starred_url":"https://api.github.com/users/MisterNando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisterNando/subscriptions","organizations_url":"https://api.github.com/users/MisterNando/orgs","repos_url":"https://api.github.com/users/MisterNando/repos","events_url":"https://api.github.com/users/MisterNando/events{/privacy}","received_events_url":"https://api.github.com/users/MisterNando/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/OpenConceptLab/oclapi/milestones/8","html_url":"https://github.com/OpenConceptLab/oclapi/milestones/OCL%20API%202015%20Q2","labels_url":"https://api.github.com/repos/OpenConceptLab/oclapi/milestones/8/labels","id":1117661,"number":8,"title":"OCL API 2015 Q2","description":"Collections, import data sources, performance improvements, and fixes","creator":{"login":"paynejd","id":1189689,"avatar_url":"https://avatars.githubusercontent.com/u/1189689?v=3","gravatar_id":"","url":"https://api.github.com/users/paynejd","html_url":"https://github.com/paynejd","followers_url":"https://api.github.com/users/paynejd/followers","following_url":"https://api.github.com/users/paynejd/following{/other_user}","gists_url":"https://api.github.com/users/paynejd/gists{/gist_id}","starred_url":"https://api.github.com/users/paynejd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paynejd/subscriptions","organizations_url":"https://api.github.com/users/paynejd/orgs","repos_url":"https://api.github.com/users/paynejd/repos","events_url":"https://api.github.com/users/paynejd/events{/privacy}","received_events_url":"https://api.github.com/users/paynejd/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":1,"state":"open","created_at":"2015-05-19T09:16:18Z","updated_at":"2015-05-19T14:50:54Z","due_on":"2015-06-30T04:00:00Z","closed_at":null},"comments":12,"created_at":"2015-05-12T15:09:06Z","updated_at":"2015-05-19T16:13:40Z","closed_at":null,"body":"I created a new version of the CIEL source:\r\n\r\n```\r\nPOST http://api.openconceptlab.org/orgs/CIEL/sources/CIEL/versions/\r\n{\r\n    \"id\": \"0.9\",\r\n    \"released\": \"true\",\r\n    \"description\": \"pre-release version\"\r\n}\r\n```\r\n\r\nI then tried grabbing concepts the new CIEL version and then from the latest version of CIEL and both returned zero concepts (note that both of these worked correctly before creating the new source version):\r\n\r\n```\r\nGET http://api.openconceptlab.org/orgs/CIEL/sources/CIEL/v0.9/concepts/\r\nGET http://api.openconceptlab.org/orgs/CIEL/sources/CIEL/concepts/\r\n```\r\n\r\nAlso, requesting specific concepts from latest or v0.9 also fails:\r\n\r\n```\r\nGET http://api.openconceptlab.org/orgs/CIEL/sources/CIEL/concepts/1002/\r\nGET http://api.openconceptlab.org/orgs/CIEL/sources/CIEL/v0.9/concepts/1002/\r\n```\r\n\r\nHowever, the concepts are still returned when I explicitly include the \"latest\" source version, using the global concept search, or requesting an individual concept with the latest source version:\r\n\r\n```\r\nGET http://api.openconceptlab.org/orgs/CIEL/sources/CIEL/55497986525c3173c33d2c4a/concepts/\r\nGET http://api.openconceptlab.org/concepts/\r\nGET http://api.openconceptlab.org/orgs/CIEL/sources/CIEL/55497986525c3173c33d2c4a/concepts/1002/\r\n```\r\n\r\nThis same behavior occurred several weeks ago. We assumed that the index got corrupted so PK rebuilt the index but unfortunately it did not correct the issue. We were forced to wipe the server."},"comment":{"url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/comments/103570833","html_url":"https://github.com/OpenConceptLab/oclapi/issues/116#issuecomment-103570833","issue_url":"https://api.github.com/repos/OpenConceptLab/oclapi/issues/116","id":103570833,"user":{"login":"paynejd","id":1189689,"avatar_url":"https://avatars.githubusercontent.com/u/1189689?v=3","gravatar_id":"","url":"https://api.github.com/users/paynejd","html_url":"https://github.com/paynejd","followers_url":"https://api.github.com/users/paynejd/followers","following_url":"https://api.github.com/users/paynejd/following{/other_user}","gists_url":"https://api.github.com/users/paynejd/gists{/gist_id}","starred_url":"https://api.github.com/users/paynejd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paynejd/subscriptions","organizations_url":"https://api.github.com/users/paynejd/orgs","repos_url":"https://api.github.com/users/paynejd/repos","events_url":"https://api.github.com/users/paynejd/events{/privacy}","received_events_url":"https://api.github.com/users/paynejd/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T16:13:40Z","updated_at":"2015-05-19T16:13:40Z","body":"Okay, please do the naive solution.\n\nAssuming that this will be quite slow to process-- Can we make trigger to\nhave happen in the background?\n\nIf you could also describe a bit more what would happen ideally? That would\nbe helpful for next phase.\n\nOn Tue, May 19, 2015, 3:39 PM MisterNando <notifications@github.com> wrote:\n\n> I mean look at what this Django admin command is doing:\n>\n> ./manage.py rebuild_index\n>\n> And do it selectively on the concepts in the new source version.\n>\n> I don't have the bandwidth to implement this right now, but I could\n> implement the \"naive\" approach as a stopgap (loop over the concepts and\n> update them individually).\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/OpenConceptLab/oclapi/issues/116#issuecomment-103557321>\n> .\n>\n"}}