elasticsearch - Term filter for boolean types does not return any results -


i have data following index (this relevant piece):

{   "content": {     "mappings" : {       "content": {         "properties": {           "published" : {             "type": "boolean"           }         }       }     }   } } 

when query using

get content/content/_search {} 

i plenty of documents published: true, when query using term filter:

get content/content/_search {   "filter": {     "term": {       "published": true     }   } } 

i don't results. what's wrong term filter?

wierd, works me on es1.0:

i indexed doc this:

put /twitter/tweet/1 {     "bool":true } 

here mapping:

get /twitter/tweet/_mapping {    "twitter": {       "mappings": {          "tweet": {             "properties": {                "bool": {                   "type": "boolean"                }             }          }       }    } } 

i can search this:

get twitter/tweet/_search {   "filter": {     "term": {       "bool": true     }   } } 

i got these results:

{    "took": 3,    "timed_out": false,    "_shards": {       "total": 1,       "successful": 1,       "failed": 0    },    "hits": {       "total": 1,       "max_score": 1,       "hits": [          {             "_index": "twitter",             "_type": "tweet",             "_id": "1",             "_score": 1,             "_source": {                "bool": true             }          }       ]    } } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -