REDUCE COLLECT is gated behind the server's unstable features flag; the feature and its API may be subject to change.
COLLECT is an FT.AGGREGATE reducer that gathers per-document projections within a GROUPBY group and returns them
as an array of per-entry maps under the reducer alias, optionally sorted and bounded.
The server does not expose it by default: it must be enabled explicitly, for example via
CONFIG SET search-enable-unstable-features yes
In a cluster the coordinator fans the query out to every shard, so the flag must be enabled on all nodes rather than only the one a given connection happens to route to. Without it, the server replies with an error.
The corresponding library feature must also be considered subject to change:
- Existing bindings may cease working correctly if the underlying server API changes.
- Changes to the server API may require changes to the library API, manifesting in either/both of build-time or run-time breaks.
Because the server itself still classes this as an unstable feature, such changes are rather more likely here than for
a feature that has simply not been out for long. If you acknowledge this, you can suppress this warning by adding the
following to your csproj file:
<NoWarn>$(NoWarn);NRS003</NoWarn>or more granularly / locally in C#:
#pragma warning disable NRS003