{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/rummager/issues/536","labels_url":"https://api.github.com/repos/alphagov/rummager/issues/536/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/rummager/issues/536/comments","events_url":"https://api.github.com/repos/alphagov/rummager/issues/536/events","html_url":"https://github.com/alphagov/rummager/pull/536","id":112323272,"number":536,"title":"Allow faceting on all filterable fields","user":{"login":"tijmenb","id":233676,"avatar_url":"https://avatars.githubusercontent.com/u/233676?v=3","gravatar_id":"","url":"https://api.github.com/users/tijmenb","html_url":"https://github.com/tijmenb","followers_url":"https://api.github.com/users/tijmenb/followers","following_url":"https://api.github.com/users/tijmenb/following{/other_user}","gists_url":"https://api.github.com/users/tijmenb/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenb/subscriptions","organizations_url":"https://api.github.com/users/tijmenb/orgs","repos_url":"https://api.github.com/users/tijmenb/repos","events_url":"https://api.github.com/users/tijmenb/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-20T09:25:16Z","updated_at":"2015-10-20T11:42:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/rummager/pulls/536","html_url":"https://github.com/alphagov/rummager/pull/536","diff_url":"https://github.com/alphagov/rummager/pull/536.diff","patch_url":"https://github.com/alphagov/rummager/pull/536.patch"},"body":"Rummager restricts the fields we use to facet. Removing that restriction will improve Rummager by having less schema/data knowledge leak into application code, making it easier to work with.\r\n\r\nThe allowed facets fields is already a subset of allowed_filter_fields, so making them equivalent is safe[1]\r\n\r\n[1] _I assume_. To be confirmed by @rboulton."},"comment":{"url":"https://api.github.com/repos/alphagov/rummager/issues/comments/149535663","html_url":"https://github.com/alphagov/rummager/pull/536#issuecomment-149535663","issue_url":"https://api.github.com/repos/alphagov/rummager/issues/536","id":149535663,"user":{"login":"rboulton","id":73564,"avatar_url":"https://avatars.githubusercontent.com/u/73564?v=3","gravatar_id":"","url":"https://api.github.com/users/rboulton","html_url":"https://github.com/rboulton","followers_url":"https://api.github.com/users/rboulton/followers","following_url":"https://api.github.com/users/rboulton/following{/other_user}","gists_url":"https://api.github.com/users/rboulton/gists{/gist_id}","starred_url":"https://api.github.com/users/rboulton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rboulton/subscriptions","organizations_url":"https://api.github.com/users/rboulton/orgs","repos_url":"https://api.github.com/users/rboulton/repos","events_url":"https://api.github.com/users/rboulton/events{/privacy}","received_events_url":"https://api.github.com/users/rboulton/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T11:42:19Z","updated_at":"2015-10-20T11:42:19Z","body":"The main reason for restricting the set of facet fields is because calculating facets can use up a lot of memory, and calculating them on fields with \"very high cardinality\" (ie, lots of different terms in the field after the analysis process) can even crash elasticsearch.  Newer versions of elasticsearch have considerably more protection against this being a problem, but I'm a bit nervous of removing the restriction with elasticsearch 1.4.4.  After we've upgraded to at least 1.6 things are a lot safer, so I'd rather upgrade before applying this change."}}