paulirwin commented on issue #1059:
URL: https://github.com/apache/lucenenet/issues/1059#issuecomment-2543445088

   Also note that I had to add an extra `TGroupValue` generic type parameter to 
AbstractDistinctValuesCollector due to removing the interfaces/covariance. The 
signature is now:
   
   ```c#
   public abstract class AbstractDistinctValuesCollector<GC, TGroupValue> : 
ICollector
       where GC : AbstractDistinctValuesCollector.GroupCount<TGroupValue>
   ```
   
   (Note that I haven't yet looked at the Collector changes, still using 
ICollector for now.)
   
   This is required because we can't make abstract types covariant, and the 
Function implementation uses MutableValue while Term uses BytesRef, and if you 
try to do something like `where GC : 
AbstractDistinctValuesCollector.GroupCount<object>`, that doesn't work because 
of the covariance issue. The only alternative is to add back the IGroupCount 
interface... I could go either way on that.
   
   Since most people will probably be using the Function or Term 
implementations and not creating their own, this likely won't affect much of 
anyone except for those that are needing to create their own grouping search 
classes.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to