[ https://issues.apache.org/jira/browse/SOLR-9574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christine Poerschke updated SOLR-9574: -------------------------------------- Attachment: SOLR-9574.patch Attaching proposed patch. In this code snippet here {code} public Query rewrite(IndexReader reader) throws IOException { Query q = mainQuery.rewrite(reader); if (q != mainQuery) { return rewrite(q); } return super.rewrite(reader); } protected abstract Query rewrite(Query rewrittenMainQuery) throws IOException; ... protected Query rewrite(Query rewrittenMainQuery) throws IOException { return new ReRankQuery(reRankQuery, reRankDocs, reRankWeight).wrap(rewrittenMainQuery); } {code} i could see the abstract method being called something else (what though?) but the wrap call i think should definitely go in the abstract method since something like {code} protected Query rewrite(Query rewrittenMainQuery) throws IOException { return new MyReRankQuery(rewrittenMainQuery, reRankQuery, reRankDocs, reRankWeight); } {code} would be a valid implementation. > factor out AbstractReRankQuery class > ------------------------------------ > > Key: SOLR-9574 > URL: https://issues.apache.org/jira/browse/SOLR-9574 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) > Reporter: Christine Poerschke > Assignee: Christine Poerschke > Priority: Minor > Attachments: SOLR-9574.patch > > > Motivation is to avoid unnecessary code duplication between > ReRankQParserPlugin and the SOLR-8542 plugin. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org