{"action":"created","issue":{"url":"https://api.github.com/repos/inonit/drf-haystack/issues/30","labels_url":"https://api.github.com/repos/inonit/drf-haystack/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/inonit/drf-haystack/issues/30/comments","events_url":"https://api.github.com/repos/inonit/drf-haystack/issues/30/events","html_url":"https://github.com/inonit/drf-haystack/issues/30","id":115364947,"number":30,"title":"ignore_fields and exclude","user":{"login":"decibyte","id":224219,"avatar_url":"https://avatars.githubusercontent.com/u/224219?v=3","gravatar_id":"","url":"https://api.github.com/users/decibyte","html_url":"https://github.com/decibyte","followers_url":"https://api.github.com/users/decibyte/followers","following_url":"https://api.github.com/users/decibyte/following{/other_user}","gists_url":"https://api.github.com/users/decibyte/gists{/gist_id}","starred_url":"https://api.github.com/users/decibyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decibyte/subscriptions","organizations_url":"https://api.github.com/users/decibyte/orgs","repos_url":"https://api.github.com/users/decibyte/repos","events_url":"https://api.github.com/users/decibyte/events{/privacy}","received_events_url":"https://api.github.com/users/decibyte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-05T20:14:56Z","updated_at":"2015-11-19T11:45:29Z","closed_at":null,"body":"I'm new to both haystack and and drf-haystack, so pardon me if I'm all wrong because my brain is fried after a long day.\r\n\r\nI'm following the examples from the [docs about `ignore_fields`](https://drf-haystack.readthedocs.org/en/latest/advanced_usage.html#drf_haystack.filters.HaystackAutocompleteFilter). But I can't get it to work as expected. I'm basically doing the same as in the example, but fields in `ignore_fields` are still serialized and transfered to the client.\r\n\r\nWhile looking at [the source](https://github.com/inonit/drf-haystack/blob/master/drf_haystack/serializers.py#L139-L144), I think I may have a guess why it is so:\r\n\r\nAs I understand the logic there, `ignore_fields` is only checked if `exclude` evaluates to `True`. I don't have an `exclude` (and neither does the example in the docs), thus my `ignore_fields` is, alas, ignored.\r\n\r\nDo you agree this is what is happening? I'd happily provide a PR for this if you like, but I'd like you to confirm this bug before I do the work. As this is probably a quick fix, you may also want to just do it yourself. Anyway, let me know!\r\n\r\nPS: [The old logic](https://github.com/inonit/drf-haystack/commit/006d33838af8ab21592b57e71a29f5d32229bde7#diff-81587f7e1acc0b2424a4e1b2fed346f7L117) seems to make more sense to me."},"comment":{"url":"https://api.github.com/repos/inonit/drf-haystack/issues/comments/158032564","html_url":"https://github.com/inonit/drf-haystack/issues/30#issuecomment-158032564","issue_url":"https://api.github.com/repos/inonit/drf-haystack/issues/30","id":158032564,"user":{"login":"decibyte","id":224219,"avatar_url":"https://avatars.githubusercontent.com/u/224219?v=3","gravatar_id":"","url":"https://api.github.com/users/decibyte","html_url":"https://github.com/decibyte","followers_url":"https://api.github.com/users/decibyte/followers","following_url":"https://api.github.com/users/decibyte/following{/other_user}","gists_url":"https://api.github.com/users/decibyte/gists{/gist_id}","starred_url":"https://api.github.com/users/decibyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decibyte/subscriptions","organizations_url":"https://api.github.com/users/decibyte/orgs","repos_url":"https://api.github.com/users/decibyte/repos","events_url":"https://api.github.com/users/decibyte/events{/privacy}","received_events_url":"https://api.github.com/users/decibyte/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T11:45:29Z","updated_at":"2015-11-19T11:45:29Z","body":"Aha! I am running 2.0.0. Let me try with an older version. Thanks!"}}