Mutiple index search problem?


(kaka) #1

index data

index_a {id: 1, name: name1, start_time: '2013-09-20', end_time: '2013-09-30'} {id: 2, name: name2, start_time: '2013-09-20', end_time: '2013-09-30'} {id: 3, name: name3, start_time: '2013-09-20', end_time: '2013-09-30'} index_b {id: 1, name: name1} {id: 2, name: name2} {id: 3, name: name3}

search

curl -X GET 'http://localhost:9200/index_a,index_b/_search?from=0&size=40&pretty' -d '{
"query": {
"bool": {
"must": [
{
"range": {
"index_a_type.start_time": {
"lte": "2013-09-23T00:00:00+08:00"
}
}
},
{
"range": {
"index_a_type.end_time": {
"gt": "2013-09-23T00:00:00+08:00"
}
}
}
]
}
},

"size": "40",
"from": "0"
}'

search results
{id: 1, name: name1, start_time: '2013-09-20', end_time: '2013-09-30'}
{id: 2, name: name2, start_time: '2013-09-20', end_time: '2013-09-30'}
{id: 3, name: name3, start_time: '2013-09-20', end_time: '2013-09-30'}
why no index index_b results?

thank!


(kaka) #2

help me


(system) #3