" This will allow some {{asXXX()}} methods in {{IndexSchemaFieldContext}} to return accessors that do simply offer a {{write(DocumentElement target, T value)}} method. This can be useful for:
\r\n\r\n * Dynamic fields, where we'd rather need {{.name( <name> \"theDynamicName\" ).write(target, <some value > )}} \r\n * Exotic data types, such as geo_shapes, where we could accept more than one types type : {{write(DocumentElement target, GeoCircle value)}}, {{write(DocumentElement target, GeoPolygon value)}}; or even custom-tailored methods avoiding the need of instantiating : {{writeCircle(DocumentElement target, GeoPoint center, double radius, DistanceUnit radiusUnit)}}, ...
I \r\n\r\nI 'm not saying we should absolutely implement the two items above, just that with the change proposed in this ticket, we could, and we could even do it in later releases. So if something allows us to make APIs evolve without breaking them, it's probably a good thing. " |
|