lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Veen <rolf.v...@gmail.com>
Subject Geospatial SortField
Date Tue, 16 Aug 2016 10:00:33 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message