{"action":"opened","issue":{"url":"https://api.github.com/repos/fergiemcdowall/norch/issues/140","repository_url":"https://api.github.com/repos/fergiemcdowall/norch","labels_url":"https://api.github.com/repos/fergiemcdowall/norch/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/fergiemcdowall/norch/issues/140/comments","events_url":"https://api.github.com/repos/fergiemcdowall/norch/issues/140/events","html_url":"https://github.com/fergiemcdowall/norch/issues/140","id":197354590,"number":140,"title":"/totalHits not working as expected?","user":{"login":"eklem","id":236656,"avatar_url":"https://avatars.githubusercontent.com/u/236656?v=3","gravatar_id":"","url":"https://api.github.com/users/eklem","html_url":"https://github.com/eklem","followers_url":"https://api.github.com/users/eklem/followers","following_url":"https://api.github.com/users/eklem/following{/other_user}","gists_url":"https://api.github.com/users/eklem/gists{/gist_id}","starred_url":"https://api.github.com/users/eklem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eklem/subscriptions","organizations_url":"https://api.github.com/users/eklem/orgs","repos_url":"https://api.github.com/users/eklem/repos","events_url":"https://api.github.com/users/eklem/events{/privacy}","received_events_url":"https://api.github.com/users/eklem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-23T11:29:53Z","updated_at":"2016-12-23T11:29:53Z","closed_at":null,"body":"I was guessing that /totalHits would take the same q.query as input as the /search endpoint. That seems to not be the case:\r\n\r\n*My search query:*\r\nhttp://oppskrift.klemespen.com:3030/search?q={\"query\":{\"AND\":{\"*\":[\"eple\"]}}}\r\n\r\n*The totalHits q/count query:*\r\nhttp://oppskrift.klemespen.com:3030/totalHits?q={\"query\":{\"AND\":{\"Varenavn\":[\"e\"]}}}\r\nhttp://oppskrift.klemespen.com:3030/totalHits?count={\"query\":{\"AND\":{\"Varenavn\":[\"e\"]}}}\r\n\r\nFirst /totalHits-query gives me an error:\r\n```json\r\nhttp://oppskrift.klemespen.com:3030/totalHits?count={\"query\":{\"AND\":{\"Varenavn\":[\"e\"]}}}\r\n```\r\nSecond /totalHits-query gives me the same as docCount - the total amount of docs in the index, but as an object.\r\n\r\n\r\nsearch-index API for totalHits:\r\nhttps://github.com/fergiemcdowall/search-index/blob/7faf44f328e87c6c5bed0ada9d90d552db195d10/doc/API.md#totalhits"}}
{"actor":{"display_login":"eklem"}}