Hi, all.

I had a piece of code to create a 'near' SoftField like this:

public SortField distanceSortField(double x, double y, IndexSearcher ix)
throws Exception {
  Point pt = ctx.makePoint(x, y);
  ValueSource valueSource = strategy.makeDistanceValueSource(pt,
DistanceUtils.DEG_TO_KM);
  return valueSource.getSortField(false);
}


This does not work anymore due to refactoring in Lucene 6 and Spatial libs.
What would be the current approach to build a 'near' SortField in Lucene
6.x, based on a GeoPointField ?

Kind regards,
Rolf.

Reply via email to