You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"reason" : "QueryPhaseExecutionException[[index1][2]: query[filtered(filtered(ConstantScore(child_filter[Child/Parent](+_tenantid:[100002 TO 100002] +%28-age:[20 TO 20] +ConstantScore%28NotDeleted%28*:*%29%29%29)))->cache(QueryWrapperFilter(+_tenantid:[100002 TO 100002] +(name:dog age:[10 TO 2147483647]))))->cache(type:Parent)],from[0],size[10],sort[<custom:"age": org.elasticsearch.index.field.data.longs.LongFieldDataType$1@1663108>!]: Query Failed [Failed to execute child query [+tenantid:[100002 TO 100002] +(-age:[20 TO 20] +ConstantScore(NotDeleted(:)))]]]; nested: NullPointerException; "
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue! I've been able to reproduce this issue on both 0.20.x and master. This issue also occurs with the has_child filter and has_parent query and filter.
curl -XPUT localhost:9200/index1/
curl localhost:9200/index1/Parent/_mapping?pretty -d '
{
"Parent" : {
"_all" : {
"enabled" : false
},
"_source" : {
"compress" : true
},
"properties" : {
"_tenantid" : {
"type" : "long",
"store" : "yes"
},
"age" : {
"type" : "long"
},
"name" : {
"type" : "string"
},
"sex" : {
"type" : "string"
}
}
}
}
'
curl localhost:9200/index1/Child/_mapping?pretty -d '
{
"Child" : {
"_all" : {
"enabled" : false
},
"_parent" : {
"type" : "Parent"
},
"_routing" : {
"required" : true
},
"_source" : {
"compress" : true
},
"properties" : {
"_tenantid" : {
"type" : "long",
"store" : "yes"
},
"age" : {
"type" : "long"
},
"name" : {
"type" : "string"
},
"shangshi" : {
"type" : "boolean"
}
}
}
}
'
curl localhost:9200/index1/Parent/_search?pretty -d '
{ "sort" : [{ "age" : {"order" : "desc"} }],"query": { "filtered": { "query": { "has_child": { "type": "Child", "query": { "query_string": { "query": "+_tenantid:100002 +(-age:20)"} } } },
"filter": { "fquery": { "query": { "query_string": { "query": "+_tenantid:100002 +(name:dog OR age:[10 TO 2147483647])" } }, "_cache": true } } } } }
'
OK, no result found, of course
curl localhost:9200/index1/Type1/key0 -d '
{"_tenantid": 100002, "name": "lilei", "age": -2, "sex": "f", "marry": false, "weight": 2.3, "height": 2.7E+23, "grade": 123, "bill": -120, "fee": 245, "money": 3453, "number": 65333,
"phone": 4200000000, "small": 123.123456789123456789, "birthday": 20120306000000}
'
curl localhost:9200/index1/Parent/_search?pretty -d '
{ "sort" : [{ "age" : {"order" : "desc"} }],"query": { "filtered": { "query": { "has_child": { "type": "Child", "query": { "query_string": { "query": "+_tenantid:100002 +(-age:20)"} } } },
"filter": { "fquery": { "query": { "query_string": { "query": "+_tenantid:100002 +(name:dog OR age:[10 TO 2147483647])" } }, "_cache": true } } } } }
'
Now, NullPointerException!
"reason" : "QueryPhaseExecutionException[[index1][2]: query[filtered(filtered(ConstantScore(child_filter[Child/Parent](+_tenantid:[100002 TO 100002] +%28-age:[20 TO 20] +ConstantScore%28NotDeleted%28*:*%29%29%29)))->cache(QueryWrapperFilter(+_tenantid:[100002 TO 100002] +(name:dog age:[10 TO 2147483647]))))->cache(type:Parent)],from[0],size[10],sort[<custom:"age": org.elasticsearch.index.field.data.longs.LongFieldDataType$1@1663108>!]: Query Failed [Failed to execute child query [+tenantid:[100002 TO 100002] +(-age:[20 TO 20] +ConstantScore(NotDeleted(:)))]]]; nested: NullPointerException; "
The text was updated successfully, but these errors were encountered: