java.lang.IllegalArgumentException: Geo distance sorting needs at least one point.


Solutions on the web

Solution icon of github
Geo distance sorting needs at least one point.

Stack trace

java.lang.IllegalArgumentException: Geo distance sorting needs at least one point.
	at org.elasticsearch.search.sort.GeoDistanceSortBuilder.<init>(GeoDistanceSortBuilder.java:130)
	at org.elasticsearch.search.sort.SortBuilders.geoDistanceSort(SortBuilders.java:88)
	at com.sksamuel.elastic4s.searches.sort.GeoDistanceSortDefinition.<init>(GeoDistanceSortDefinition.scala:13)
	at com.sksamuel.elastic4s.searches.sort.SortDsl$GeoSortExpectsPoints.points(SortDsl.scala:27)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.