{"issue":{"user":{"id":95129,"login":"ofavre","url":"https://api.github.com/users/ofavre","gravatar_id":"447af04b2ce71a960030e56a90356306","avatar_url":"https://secure.gravatar.com/avatar/447af04b2ce71a960030e56a90356306?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"milestone":null,"title":"Documentation not precise enough for \"term\" queries","created_at":"2011-05-31T16:52:10Z","labels":[],"updated_at":"2011-12-21T17:21:56Z","state":"open","id":979786,"closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/elasticsearch/elasticsearch/issues/983","body":"According to the documentation, term queries are never analyzed [1].\r\nHowever it seems that they are, at least concerning boolean fields.\r\n\r\nTake a look:\r\nhttps://gist.github.com/1000701\r\nhttps://gist.github.com/12e8fcd5528193e6119b\r\n\r\nThe doc [2] says that boolean fields are indexed under the `T` and `F` terms, so the `term` query against that field using `T` or `F` should work well. But both of them end up being considered as true so the results give back the \"true\" docs.\r\nQuerying with `0`, `off` or `false` works as intended... but those values aren't terms!\r\n\r\nThe doc should be more precise and say something like:\r\n> For `string` fields, the term is taken as is (**not analyzed**),\r\n> whereas it is analyzed for numeric, date and boolean types\r\n> to match the internally equivalent terms in the index.\r\n> In particular, you should not search for `T` or `F` for boolean queries,\r\n> but you should use the regular values (`0`,`1`,`on`,`off`,`true`,`false`) instead.\r\n\r\n  [1] http://www.elasticsearch.org/guide/reference/query-dsl/term-query.html\r\n  [2] http://www.elasticsearch.org/guide/reference/mapping/core-types.html","number":983,"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/983","comments":2,"assignee":null},"comment":{"user":{"id":324123,"login":"Avatah","url":"https://api.github.com/users/Avatah","gravatar_id":"eedff2152a1e93bafd8a7254e59e5883","avatar_url":"https://secure.gravatar.com/avatar/eedff2152a1e93bafd8a7254e59e5883?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"created_at":"2011-12-21T17:21:56Z","updated_at":"2011-12-21T17:21:56Z","id":3236607,"body":"I try to do term facet on boolean field and it returns me 'T' and 'F' values.\r\nBut using this values in TermFilter fails - both return only \"true\" documents.\r\nMaybe 'F' term should also be considered as false?\r\nHow to do faceting on boolean field properly?","url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/comments/3236607"},"action":"created"}