i dont understand how sort by distance has been achieved using below mentioned code.
Please explain me...how lucene handles sortfield if sortfield is ""? DistanceQueryBuilder queryBuilder = new DistanceQueryBuilder(latitude, longitude, radius, "lat", "lon", CartesianTierPlotter.DEFALT_FIELD_PREFIX, true); DistanceFieldComparatorSource distComp = new DistanceFieldComparatorSource(queryBuilder.getDistanceFilter()); Sort distSort = new Sort(new SortField("", distComp,false)); PS: i am using lucene 3.0.3 Raised the same here too. http://stackoverflow.com/questions/22929423/how-lucene-handles-sortfield-with-comparator-if-sortfield-is Kumaran R