{"action":"opened","issue":{"url":"https://api.github.com/repos/davbre/mira/issues/6","labels_url":"https://api.github.com/repos/davbre/mira/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/davbre/mira/issues/6/comments","events_url":"https://api.github.com/repos/davbre/mira/issues/6/events","html_url":"https://github.com/davbre/mira/issues/6","id":119273703,"number":6,"title":"PostgreSQL error when trying to index large text columns","user":{"login":"davbre","id":1131391,"avatar_url":"https://avatars.githubusercontent.com/u/1131391?v=3","gravatar_id":"","url":"https://api.github.com/users/davbre","html_url":"https://github.com/davbre","followers_url":"https://api.github.com/users/davbre/followers","following_url":"https://api.github.com/users/davbre/following{/other_user}","gists_url":"https://api.github.com/users/davbre/gists{/gist_id}","starred_url":"https://api.github.com/users/davbre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davbre/subscriptions","organizations_url":"https://api.github.com/users/davbre/orgs","repos_url":"https://api.github.com/users/davbre/repos","events_url":"https://api.github.com/users/davbre/events{/privacy}","received_events_url":"https://api.github.com/users/davbre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-28T06:13:18Z","updated_at":"2015-11-28T06:13:18Z","closed_at":null,"body":"Currently everything is indexed by default. When there are large text columns, this type message is returned during the data import:\r\n\r\nPG::ProgramLimitExceeded: ERROR:  index row size 3432 exceeds maximum 2712 for index \"index_xy36_69_on_provenance_text\"\r\nHINT:  Values larger than 1/3 of a buffer page cannot be indexed.\r\nConsider a function index of an MD5 hash of the value, or use full text indexing.\r\n\r\nOne option would be to add an additional key-value pair for each field indicating whether or not it should be indexed, e.g. \"index: false\". Otherwise the max length could be added to the field's \"constraints\" object, and this information then used to decide to index of not. Inclined to go with first option."}}