Skip to content

Instantly share code, notes, and snippets.

@svartalf
Last active August 29, 2015 14:04
Show Gist options
  • Save svartalf/c3cb76c40dd4fa1374fa to your computer and use it in GitHub Desktop.
Save svartalf/c3cb76c40dd4fa1374fa to your computer and use it in GitHub Desktop.
curl -XGET "http://localhost:9200/postings/_search" -d '{
"query": {
"filtered": {
"filter": {
"geo_bounding_box": {
"point": {
"bottom_right": [
104.45856200712711,
52.208730692828844
],
"top_left": [
104.19077025908017,
52.34035674074375
]
}
}
},
"query": {
"match_all": {}
}
}
},
"aggregations": {
"cells": {
"geohash_grid": {
"field": "point",
"precision": 6
},
"aggregations": {
"lat": {
"avg": {
"script": "doc[\'point\'].lat"
}
},
"lon": {
"avg": {
"script": "doc[\'point\'].lon"
}
},
"hits": {
"top_hits": {
"_source": {
"include": [
"short_description"
]
},
"size": 1
}
},
"aggregations": {
"bounds": {
"geo_bounds": {
"field": "point"
}
}
}
}
}
},
"size": 0
}'
{
"status": 500,
"error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[13zIZj7SSpKno5Z69NAz1g][search][1]: QueryPhaseExecutionException[[search][1]: query[filtered(ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396])))->cache(_type:realty_sellflatposting)],from[0],size[0]: Query Failed [Failed to execute main query]]; nested: ArrayIndexOutOfBoundsException; }{[u74WU74DS4WIWDiHH3jNlw][search][0]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][0]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.54413615927396, 52.199464426358276], \"top_left\": [104.27634441122711, 52.33111808740076]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"hits\": {\"top_hits\": {\"_source\": {\"include\": [\"short_description\"]}, \"size\": 1}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][0]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [top_hits] in [hits]]]; }{[13zIZj7SSpKno5Z69NAz1g][search][3]: QueryPhaseExecutionException[[search][3]: query[filtered(ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396])))->cache(_type:realty_sellflatposting)],from[0],size[0]: Query Failed [Failed to execute main query]]; nested: ArrayIndexOutOfBoundsException; }{[u74WU74DS4WIWDiHH3jNlw][search][2]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][2]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.54413615927396, 52.199464426358276], \"top_left\": [104.27634441122711, 52.33111808740076]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"hits\": {\"top_hits\": {\"_source\": {\"include\": [\"short_description\"]}, \"size\": 1}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][2]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [top_hits] in [hits]]]; }{[u74WU74DS4WIWDiHH3jNlw][search][4]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][4]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.54413615927396, 52.199464426358276], \"top_left\": [104.27634441122711, 52.33111808740076]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"hits\": {\"top_hits\": {\"_source\": {\"include\": [\"short_description\"]}, \"size\": 1}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][4]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.33111808740076, 104.27634441122711], [52.199464426358276, 104.54413615927396]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [top_hits] in [hits]]]; }]"
}
{
"status": 500,
"error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[u74WU74DS4WIWDiHH3jNlw][search][1]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][1]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.332905869821516, 104.15801277840286], [52.20125755196421, 104.42580452644975]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.42580452644975, 52.20125755196421], \"top_left\": [104.15801277840286, 52.332905869821516]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"hits\": {\"top_hits\": {\"_source\": {\"include\": [\"short_description\"]}, \"size\": 1}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][1]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.332905869821516, 104.15801277840286], [52.20125755196421, 104.42580452644975]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [top_hits] in [hits]]]; }{[13zIZj7SSpKno5Z69NAz1g][search][0]: QueryPhaseExecutionException[[search][0]: query[filtered(ConstantScore(GeoBoundingBoxFilter(point, [52.332905869821516, 104.15801277840286], [52.20125755196421, 104.42580452644975])))->cache(_type:realty_sellflatposting)],from[0],size[0]: Query Failed [Failed to execute main query]]; nested: ArrayIndexOutOfBoundsException; }{[u74WU74DS4WIWDiHH3jNlw][search][3]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][3]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.332905869821516, 104.15801277840286], [52.20125755196421, 104.42580452644975]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.42580452644975, 52.20125755196421], \"top_left\": [104.15801277840286, 52.332905869821516]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"hits\": {\"top_hits\": {\"_source\": {\"include\": [\"short_description\"]}, \"size\": 1}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][3]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.332905869821516, 104.15801277840286], [52.20125755196421, 104.42580452644975]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [top_hits] in [hits]]]; }{[13zIZj7SSpKno5Z69NAz1g][search][2]: QueryPhaseExecutionException[[search][2]: query[filtered(ConstantScore(GeoBoundingBoxFilter(point, [52.332905869821516, 104.15801277840286], [52.20125755196421, 104.42580452644975])))->cache(_type:realty_sellflatposting)],from[0],size[0]: Query Failed [Failed to execute main query]]; nested: ArrayIndexOutOfBoundsException; }{[13zIZj7SSpKno5Z69NAz1g][search][4]: QueryPhaseExecutionException[[search][4]: query[filtered(ConstantScore(GeoBoundingBoxFilter(point, [52.332905869821516, 104.15801277840286], [52.20125755196421, 104.42580452644975])))->cache(_type:realty_sellflatposting)],from[0],size[0]: Query Failed [Failed to execute main query]]; nested: ArrayIndexOutOfBoundsException; }]"
}
{
"status": 500,
"error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[13zIZj7SSpKno5Z69NAz1g][search][1]: QueryPhaseExecutionException[[search][1]: query[filtered(ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092])))->cache(_type:realty_sellflatposting)],from[0],size[0]: Query Failed [Failed to execute main query]]; nested: ArrayIndexOutOfBoundsException; }{[u74WU74DS4WIWDiHH3jNlw][search][0]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][0]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.34207668984092, 52.237947910612164], \"top_left\": [104.20818081581737, 52.30376648309116]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][0]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [geo_bounds] in [bounds]]]; }{[13zIZj7SSpKno5Z69NAz1g][search][3]: QueryPhaseExecutionException[[search][3]: query[filtered(ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092])))->cache(_type:realty_sellflatposting)],from[0],size[0]: Query Failed [Failed to execute main query]]; nested: ArrayIndexOutOfBoundsException; }{[u74WU74DS4WIWDiHH3jNlw][search][2]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][2]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.34207668984092, 52.237947910612164], \"top_left\": [104.20818081581737, 52.30376648309116]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][2]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [geo_bounds] in [bounds]]]; }{[u74WU74DS4WIWDiHH3jNlw][search][4]: RemoteTransportException[[William Baker][inet[/192.168.99.43:9300]][search/phase/query]]; nested: SearchParseException[[search][4]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092]))],from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\": {\"filtered\": {\"filter\": {\"geo_bounding_box\": {\"point\": {\"bottom_right\": [104.34207668984092, 52.237947910612164], \"top_left\": [104.20818081581737, 52.30376648309116]}}}, \"query\": {\"match_all\": {}}}}, \"aggregations\": {\"cells\": {\"geohash_grid\": {\"field\": \"point\", \"precision\": 6}, \"aggregations\": {\"lat\": {\"avg\": {\"script\": \"doc['point'].lat\"}}, \"lon\": {\"avg\": {\"script\": \"doc['point'].lon\"}}, \"bounds\": {\"geo_bounds\": {\"field\": \"point\"}}}}}, \"size\": 0}]]]; nested: SearchParseException[[search][4]: query[ConstantScore(GeoBoundingBoxFilter(point, [52.30376648309116, 104.20818081581737], [52.237947910612164, 104.34207668984092]))],from[-1],size[-1]: Parse Failure [Could not find aggregator type [geo_bounds] in [bounds]]]; }]"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment