{"action":"created","issue":{"url":"https://api.github.com/repos/NRGI/resourcecontracts.org/issues/17","labels_url":"https://api.github.com/repos/NRGI/resourcecontracts.org/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/NRGI/resourcecontracts.org/issues/17/comments","events_url":"https://api.github.com/repos/NRGI/resourcecontracts.org/issues/17/events","html_url":"https://github.com/NRGI/resourcecontracts.org/issues/17","id":82489438,"number":17,"title":"Setup and implement index in Elasticsearch (ES) for Contract Metadata","user":{"login":"anderspeders","id":1101585,"avatar_url":"https://avatars.githubusercontent.com/u/1101585?v=3","gravatar_id":"","url":"https://api.github.com/users/anderspeders","html_url":"https://github.com/anderspeders","followers_url":"https://api.github.com/users/anderspeders/followers","following_url":"https://api.github.com/users/anderspeders/following{/other_user}","gists_url":"https://api.github.com/users/anderspeders/gists{/gist_id}","starred_url":"https://api.github.com/users/anderspeders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderspeders/subscriptions","organizations_url":"https://api.github.com/users/anderspeders/orgs","repos_url":"https://api.github.com/users/anderspeders/repos","events_url":"https://api.github.com/users/anderspeders/events{/privacy}","received_events_url":"https://api.github.com/users/anderspeders/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NRGI/resourcecontracts.org/milestones/2","html_url":"https://github.com/NRGI/resourcecontracts.org/milestones/Sprint%20%232","labels_url":"https://api.github.com/repos/NRGI/resourcecontracts.org/milestones/2/labels","id":1140315,"number":2,"title":"Sprint #2","description":"","creator":{"login":"anderspeders","id":1101585,"avatar_url":"https://avatars.githubusercontent.com/u/1101585?v=3","gravatar_id":"","url":"https://api.github.com/users/anderspeders","html_url":"https://github.com/anderspeders","followers_url":"https://api.github.com/users/anderspeders/followers","following_url":"https://api.github.com/users/anderspeders/following{/other_user}","gists_url":"https://api.github.com/users/anderspeders/gists{/gist_id}","starred_url":"https://api.github.com/users/anderspeders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderspeders/subscriptions","organizations_url":"https://api.github.com/users/anderspeders/orgs","repos_url":"https://api.github.com/users/anderspeders/repos","events_url":"https://api.github.com/users/anderspeders/events{/privacy}","received_events_url":"https://api.github.com/users/anderspeders/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":0,"state":"open","created_at":"2015-05-29T16:17:49Z","updated_at":"2015-06-17T08:03:35Z","due_on":"2015-06-28T18:15:00Z","closed_at":null},"comments":2,"created_at":"2015-05-29T16:13:07Z","updated_at":"2015-06-17T08:14:06Z","closed_at":null,"body":"Should make basic metadata available and provide documentation. Oauth for POST and PUT functionality. GET functionallity for document data should be fully exposed."},"comment":{"url":"https://api.github.com/repos/NRGI/resourcecontracts.org/issues/comments/112711424","html_url":"https://github.com/NRGI/resourcecontracts.org/issues/17#issuecomment-112711424","issue_url":"https://api.github.com/repos/NRGI/resourcecontracts.org/issues/17","id":112711424,"user":{"login":"anjesh","id":120488,"avatar_url":"https://avatars.githubusercontent.com/u/120488?v=3","gravatar_id":"","url":"https://api.github.com/users/anjesh","html_url":"https://github.com/anjesh","followers_url":"https://api.github.com/users/anjesh/followers","following_url":"https://api.github.com/users/anjesh/following{/other_user}","gists_url":"https://api.github.com/users/anjesh/gists{/gist_id}","starred_url":"https://api.github.com/users/anjesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjesh/subscriptions","organizations_url":"https://api.github.com/users/anjesh/orgs","repos_url":"https://api.github.com/users/anjesh/repos","events_url":"https://api.github.com/users/anjesh/events{/privacy}","received_events_url":"https://api.github.com/users/anjesh/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T08:14:06Z","updated_at":"2015-06-17T08:14:06Z","body":"The elasticsearch (ES) will be setup and indexing will be implemented for the contracts metadata. The indexing will occur when the contract metadata gets published as described in the workflow #75 \r\n\r\nES could reside in different server later for performance. \r\n\r\nThe json schema for the ES needs to be defined first the the contracts metadata. \r\n\r\nThere will be two independent processes for getting the published contracts metadata to the ES. \r\n* Bulk import - one time or when the ES index gets crashed or we need to flush it\r\n* Real-time import - when the contract gets published after #75 \r\n\r\nBulk import\r\nThere will be a script that pulls all the published contracts metadata from the database, prepares the desired document object (as per json schema) and indexes to the ES.\r\n\r\nReal-time import\r\nWhen the contract gets published, the system will prepare the document json object of the published contract and calls the service to index that particular contract to ES.\r\n\r\nThe service to index the document to ES will handle create or update. It will check whether the contract metadata is to be updated or created and takes action accordingly. \r\n"}}