" The idea would be to allow to create {{Projection<T>}} objects from a {{SearchTarget}}, and use these objects when creating a query: {{.asProjections( projectionObject1, projectionObject2, ...)}}.
This \r\n\r\nThis would allow three things:
\r\n\r\n * Implementation parameterized projections, where naming the projection is not enough, and we need to pass paramters to it. See for example the spatial distance projections, where we need to pass a latitude and longitude: HSEARCH-3190 \r\n * Enabling of disabling bridges in projections; see HSEARCH- 3222 3223\r\n * Type-safe projections, i.e. passing typed references to the {{asProjections()}} methods, and get a {{SearchQuery<Pair<T, U>>}}, or {{SearchQuery<Triplet<T, U, V>>}}, and so on depending on the number of parameters. This would obviously only be possible for a small number of parameters (say, up to 5), because we would have to declare and implement one {{asProjections()}} method for each possible number of parameters. Note that, in order to allow that, we should at the very least make {{asProjections}} set the query type to {{SearchQuery<? extends List<?>>}} instead of the current {{SearchQuery<List<?>>}}.
See \r\n\r\nSee also HSEARCH-2265 " |
|