First, put some sample data:
curl -XPUT 'localhost:9200/testindex/action1/1?pretty' -d '
{
"title": "jumping tom",
"val": 101
}'
curl -XPUT 'localhost:9200/testindex/action2/1?pretty' -d '
{
"title": "jumping jerry",
"val": "test"
}'
as you can see, and the mapping is :
{
"action1" : {
"properties" : {
"val" : {
"type" : "long"
},
"title" : {
"type" : "string"
}
}
},
"action2" : {
"properties" : {
"val" : {
"type" : "string"
},
"title" : {
"type" : "string"
}
}
}
}
But when do a aggs action:
curl 'http://192.168.2.245:9200/testindex/action1/_search' -d '
{
"aggs": {
"vals": {
"terms": {
"field": "val"
}
}
}
}'
{
"took" : 37,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 4,
"failed" : 1,
"failures" : [
{
"index" : "testindex",
"shard" : 2,
"status" : 500,
"reason" : "RemoteTransportException[[a00][inet[/192.168.2.246:9300]][search/phase/query]];
nested: ElasticsearchException[java.lang.NumberFormatException: Invalid
shift value (84) in prefixCoded bytes (is encoded value really an INT?)];
nested: UncheckedExecutionException[java.lang.NumberFormatException:
Invalid shift value (84) in prefixCoded bytes (is encoded value really an
INT?)]; nested: NumberFormatException[Invalid shift value (84) in
prefixCoded bytes (is encoded value really an INT?)]; "
}
]
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [
]
},
"aggregations" : {
"vals" : {
"buckets" : [
]
}
}
}
The val field in action1 type is mapped to long, but it seems that ES still
scan the action2 type even if I specify the action1 type.
any advice to resolve this issue ? thanks.
不学习,不知道
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CA%2BJstLB_Md4w49%2BDW2O2OuLY6RBAR0DPz6rHLvb9WcLq8h3n6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.