-
Notifications
You must be signed in to change notification settings - Fork 25.8k
geo_shape query/filter: indexed_shape has no syntax to define _routing value and throws RoutingMissingException, because _routing undefined #7663
Copy link
Copy link
Closed
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme
Description
Currently, GeoShape filter and query supports to pre-indexed shape as argument[1].
But, there are no way to define required _routing value for pre-indexed shape. This causes RoutingMissingException if routing is mandatory.
elasticsearch version 1.3.2
For example, mapping is:
curl -XPOST 'localhost:9200/-inx/ang/_mapping' -d'{
"ang" : {
"_parent" : {
"type" : "someType"
},
"_routing" : {
"required" : true
},
"properties" : {
"to" : {
"type" : "geo_shape",
"tree_levels" : 6
}
}
}
}'
Add some data:
curl -XPUT 'localhost:9200/-inx/ang/ouX6eeH5RxKQG3vJ5Ho84A?parent=111' -d '{
"to" : {
"type" : "circle",
"coordinates" : [-45.0, 45.0],
"radius" : "100m"
}
}'
Let's make a query:
curl -XGET 'localhost:9200/_search' -d'{
"query" : {
"geo_shape" : {
"to" : {
"indexed_shape" : {
"type" : "ang",
"index" : "-inx",
"path" : "to",
"id" : "ouX6eeH5RxKQG3vJ5Ho84A"
}
}
}
}
}'
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query_fetch], all shards failed; shardFailures {[eryGHbZWSMa-YJiCpgVbcg][-inx][0]:
RemoteTransportException[[Alistair Smythe][inet[/127.0.0.1:9300]][search/phase/query+fetch]]; nested: SearchParseException[[-inx][0]: from[0],size[10]:
Parse Failure [Failed to parse source [{"query":{"geo_shape":{"to":{"indexed_shape":{"id":"ouX6eeH5RxKQG3vJ5Ho84A","type":"ang","index":"-inx","path":"to"}}}}}]]];
nested: RoutingMissingException[routing is required for [-inx]/[ang]/[ouX6eeH5RxKQG3vJ5Ho84A]]; }
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:233) ~[elasticsearch-1.3.2.jar:na]
at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:179) ~[elasticsearch-1.3.2.jar:na]
at org.elasticsearch.search.action.SearchServiceTransportAction$12.handleException(SearchServiceTransportAction.java:326) ~[elasticsearch-1.3.2.jar:na]
at org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:185) ~[elasticsearch-1.3.2.jar:na]
at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:175) ~[elasticsearch-1.3.2.jar:na]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
:Analytics/GeoIndexing, search aggregations of geo points and shapesIndexing, search aggregations of geo points and shapes>buggood first issuelow hanging fruitlow hanging fruithelp wantedadoptmeadoptme
Type
Fields
Give feedbackNo fields configured for issues without a type.