{"action":"created","issue":{"url":"https://api.github.com/repos/zombodb/zombodb/issues/27","labels_url":"https://api.github.com/repos/zombodb/zombodb/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/zombodb/zombodb/issues/27/comments","events_url":"https://api.github.com/repos/zombodb/zombodb/issues/27/events","html_url":"https://github.com/zombodb/zombodb/issues/27","id":103937390,"number":27,"title":"Difficulty with aggregations","user":{"login":"ryancutter","id":603932,"avatar_url":"https://avatars.githubusercontent.com/u/603932?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancutter","html_url":"https://github.com/ryancutter","followers_url":"https://api.github.com/users/ryancutter/followers","following_url":"https://api.github.com/users/ryancutter/following{/other_user}","gists_url":"https://api.github.com/users/ryancutter/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancutter/subscriptions","organizations_url":"https://api.github.com/users/ryancutter/orgs","repos_url":"https://api.github.com/users/ryancutter/repos","events_url":"https://api.github.com/users/ryancutter/events{/privacy}","received_events_url":"https://api.github.com/users/ryancutter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-30T18:12:59Z","updated_at":"2015-08-30T20:02:43Z","closed_at":null,"body":"I created the 'books' table from the tutorial and loaded a couple rows.  The SELECT works great!\r\n\r\nI'm really interested in the aggregations but can't get either of the agg-related functions to work.  This might be operator error - if so, perhaps the API docs can match the story started in the tutorial?\r\n<pre><code>\r\nSELECT * FROM zdb_arbitrary_aggregate('books', '{\r\n \"aggregations\": {\r\n   \"my_agg\": {\r\n     \"terms\": {\r\n       \"field\": \"title\"\r\n     }\r\n   }\r\n }\r\n}', '');\r\n</code></pre>\r\nyields the following error in ES:\r\n<pre><code>\r\nERROR:  rc=500; QueryRewriteException[com.tcdi.zombodb.query_parser.ParseException: Encountered \" <OPERATOR> \": \"\" at line 2, column 16.\r\nWas expecting one of:\r\n    <EOF> \r\n    <NOT> ...\r\n    \"and\" ...\r\n    \"or\" ...\r\n    \",\" ...\r\n    \"&\" ...\r\n    \"!\" ...\r\n    \"or\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \",\" ...\r\n    \"and\" ...\r\n    \"&\" ...\r\n    <NOT> ...\r\n    \"!\" ...\r\n</code></pre>\r\nTried with field \"content\" to no avail.\r\n\r\nNo joy with the significant terms method as well:\r\n<code>\r\nSELECT * FROM zdb_significant_terms('books', 'content', '', '', 5000);\r\n</code>\r\n\r\nyields the following error in ES:\r\n<code>\r\norg.elasticsearch.ElasticsearchIllegalStateException: Field data loading is forbidden on content\r\n</code>"},"comment":{"url":"https://api.github.com/repos/zombodb/zombodb/issues/comments/136179018","html_url":"https://github.com/zombodb/zombodb/issues/27#issuecomment-136179018","issue_url":"https://api.github.com/repos/zombodb/zombodb/issues/27","id":136179018,"user":{"login":"eeeebbbbrrrr","id":5117238,"avatar_url":"https://avatars.githubusercontent.com/u/5117238?v=3","gravatar_id":"","url":"https://api.github.com/users/eeeebbbbrrrr","html_url":"https://github.com/eeeebbbbrrrr","followers_url":"https://api.github.com/users/eeeebbbbrrrr/followers","following_url":"https://api.github.com/users/eeeebbbbrrrr/following{/other_user}","gists_url":"https://api.github.com/users/eeeebbbbrrrr/gists{/gist_id}","starred_url":"https://api.github.com/users/eeeebbbbrrrr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeeebbbbrrrr/subscriptions","organizations_url":"https://api.github.com/users/eeeebbbbrrrr/orgs","repos_url":"https://api.github.com/users/eeeebbbbrrrr/repos","events_url":"https://api.github.com/users/eeeebbbbrrrr/events{/privacy}","received_events_url":"https://api.github.com/users/eeeebbbbrrrr/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T20:02:43Z","updated_at":"2015-08-30T20:02:43Z","body":"Oh wow. You attempted to do it from source?  Brave soul, you are.  That's a process that needs to be documented carefully.  For example, if your libcurl uses the threaded resolver, ZDB will eventually cause Postgres to segfault. \n\nAre you on OSX by chance?"}}