nknize commented on PR #12162: URL: https://github.com/apache/lucene/pull/12162#issuecomment-1440455711
> This PR doesn't have this, but I'm unsure what should be the canonical representation of a geo point in stored fields. @jpountz Thinking out loud here, would it make sense to add something like a `StoredFieldCanonicalFormat` interface that offers `Object format(BytesRef ...` `Object format(long ...` methods? This way we could decide to store LatLonPoint as an efficient integer encoded XY long value and provide standard formatters like: `LatLonPointStandardFormatter` - formats to standard lat, lon string representation. `LatLonPointJSONFormatter` - formats to the geojson standard string representation. `XYPointStandardFormatter` - formats to standard x, y string representation. Of course we could keep things tidy by having something like ```java public class LatLonPointStandardFormatter { public static class JSON implements StoredFieldCanonicalFormat { @override public String format(BytesRef value) { StringBuffer sb = ... return sb.toString(); } } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org