{"action":"opened","issue":{"url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1389","repository_url":"https://api.github.com/repos/django-haystack/django-haystack","labels_url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1389/labels{/name}","comments_url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1389/comments","events_url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1389/events","html_url":"https://github.com/django-haystack/django-haystack/issues/1389","id":162638222,"number":1389,"title":"How to index postgres' JSONField?","user":{"login":"kristoff-it","id":1950733,"avatar_url":"https://avatars.githubusercontent.com/u/1950733?v=3","gravatar_id":"","url":"https://api.github.com/users/kristoff-it","html_url":"https://github.com/kristoff-it","followers_url":"https://api.github.com/users/kristoff-it/followers","following_url":"https://api.github.com/users/kristoff-it/following{/other_user}","gists_url":"https://api.github.com/users/kristoff-it/gists{/gist_id}","starred_url":"https://api.github.com/users/kristoff-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristoff-it/subscriptions","organizations_url":"https://api.github.com/users/kristoff-it/orgs","repos_url":"https://api.github.com/users/kristoff-it/repos","events_url":"https://api.github.com/users/kristoff-it/events{/privacy}","received_events_url":"https://api.github.com/users/kristoff-it/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-28T09:12:00Z","updated_at":"2016-06-28T09:12:00Z","closed_at":null,"body":"Hi, I'm not sure if this is something I failed to find/understand from the docs or if it is an entirely new feature.\r\n\r\nBasically I have a project in which models have a 'custom property' system powered by Postgres' JSONField. This allows users to add a json document to the set of properties of each object.\r\nI'd like to be able to search (via ES) those fields like they were any other property.\r\n\r\nAs an example:\r\n```\r\n# models.py\r\nclass MyModel(models.Model):\r\n   name = models.CharField()\r\n   attrs = postgres.fields.JSONField(default=dict)\r\n\r\n# how I'd expect ES documents to look like:\r\n{\r\n   \"name\": \"banana\",\r\n   \"attrs\" : { \"fruitColor\": \"yellow\", \"growsOnTrees\": true}\r\n},\r\n\r\n{\r\n   \"name\": \"samuel\",\r\n   \"attrs\" : { \"friends\": [\"mark\", \"francesca\", \"luke\"], \"birthday\": \"10/10/1990\"}\r\n}\r\n```\r\n\r\nWhat type of SearchField should I use?\r\nThanks!"}}
{"actor":{"display_login":"kristoff-it"}}