{"action":"created","issue":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1612","repository_url":"https://api.github.com/repos/cfpb/cfgov-refresh","labels_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1612/labels{/name}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1612/comments","events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1612/events","html_url":"https://github.com/cfpb/cfgov-refresh/pull/1612","id":141687773,"number":1612,"title":"Fix related posts","user":{"login":"kurtw","id":1412978,"avatar_url":"https://avatars.githubusercontent.com/u/1412978?v=3","gravatar_id":"","url":"https://api.github.com/users/kurtw","html_url":"https://github.com/kurtw","followers_url":"https://api.github.com/users/kurtw/followers","following_url":"https://api.github.com/users/kurtw/following{/other_user}","gists_url":"https://api.github.com/users/kurtw/gists{/gist_id}","starred_url":"https://api.github.com/users/kurtw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurtw/subscriptions","organizations_url":"https://api.github.com/users/kurtw/orgs","repos_url":"https://api.github.com/users/kurtw/repos","events_url":"https://api.github.com/users/kurtw/events{/privacy}","received_events_url":"https://api.github.com/users/kurtw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-17T19:43:13Z","updated_at":"2016-03-18T13:12:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/1612","html_url":"https://github.com/cfpb/cfgov-refresh/pull/1612","diff_url":"https://github.com/cfpb/cfgov-refresh/pull/1612.diff","patch_url":"https://github.com/cfpb/cfgov-refresh/pull/1612.patch"},"body":"Phew. This one was a bit of a doozy. This does a few things but is all related to getting this related posts mechanism working once and for all. Basically, it's adding a script to update the ES index with new settings (something we didn't have) then updating the tags field in the mapping so we can perform lowercase searches for content while still maintain the original case in places like the filters, then it adds a new search method on the Query class in sheerlike to actually get the posts by the lowercase tag.\r\n\r\nThen another commit updates the templates to actually render things properly, adding a generic streamfield template.\r\n\r\n## Additions\r\n\r\n- New script to update es settings\r\n- New method to find documents based on tags\r\n- New newsroom query\r\n- New analyzer for tags\r\n- Template for generic rendering of sidefoot streamfield\r\n\r\n## Changes\r\n\r\n- All page templates now use this generic sidefoot streamfield template\r\n\r\n## Testing\r\n\r\n- First, run `./cfgov/manage.py runscript update_es_settings`\r\n- Then, run `./cfgov/manage.py sheer_index -r`\r\n- Go [here](http://content.localhost:8000/about-us/payments-harmed-consumers/civil-penalty-fund/consumer-education-financial-literacy/). If you can see related posts, then hallelujah.\r\n- Check /blogs/ and /newsroom/ to make sure those still work\r\n\r\n## Review\r\n\r\n- @richaagarwal \r\n- @kave \r\n- @rosskarchner \r\n"},"comment":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/comments/198348801","html_url":"https://github.com/cfpb/cfgov-refresh/pull/1612#issuecomment-198348801","issue_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/1612","id":198348801,"user":{"login":"kave","id":254877,"avatar_url":"https://avatars.githubusercontent.com/u/254877?v=3","gravatar_id":"","url":"https://api.github.com/users/kave","html_url":"https://github.com/kave","followers_url":"https://api.github.com/users/kave/followers","following_url":"https://api.github.com/users/kave/following{/other_user}","gists_url":"https://api.github.com/users/kave/gists{/gist_id}","starred_url":"https://api.github.com/users/kave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kave/subscriptions","organizations_url":"https://api.github.com/users/kave/orgs","repos_url":"https://api.github.com/users/kave/repos","events_url":"https://api.github.com/users/kave/events{/privacy}","received_events_url":"https://api.github.com/users/kave/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T13:12:11Z","updated_at":"2016-03-18T13:12:11Z","body":"@kurtw can you document somewhere so we remember to do these steps not only on flapjack/refresh but also on beta/build `./cfgov/manage.py runscript update_es_settings`?"}}