stephen-woods commented on PR #2506:
URL: https://github.com/apache/solr/pull/2506#issuecomment-2174337869
Are you saying that we should add a generic type to RankQuery?
ie.
```java
public abstract class RankQuery<T extends ScoreDoc> extends
ExtendedQueryBase {
public abstract TopDocsCollector<T> getTopDocsCollector(
int len, QueryCommand cmd, IndexSearcher searcher) throws IOException;
```
Though that approach would probably be more ideal given the reasons Bloch
indicates in his book, it is by far more disruptive. All existing `RankQuery`
subclasses would need to be modified including any custom classes that may
exist in third party plugin libraries - it's a breaking change... something I
was trying to avoid as much as possible.
All that effort to "make API flexibility" at the one and only call site:
`SolrIndexSearcher`, a class that uses `instanceof` gratuitously all over the
place.
--
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]