hossman commented on PR #16654: URL: https://github.com/apache/lucene/pull/16654#issuecomment-5593497659
> One issue with this change: users won't be able to subclass the queries and override functions (for example approximateSearch). > I wonder if we should create new classes entirely, or keep initialization constructor-based? (and let users discover the breakage through their tests) My original suggestion of static factory methods was definitely a naive strawman from a non-expert in this area. I have no idea how important it is for existing non-final methods (like approximateSearch) to be overridable by downstream subclasses. If folks think that new (distinct) classnames (or constructor signatures on the existing classnames) are a better way to go -- so be it. I will say this: the fatory method names currently in this PR (`createNew(...)` and `createLegacy(..)`) feel like they will be "dated" and vague/confusing as soon as they are committed. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
