[jira] [Updated] (SOLR-9574) factor out AbstractReRankQuery class

2017-04-14 Thread Mark Miller (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-9574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Miller updated SOLR-9574:
--
Fix Version/s: (was: 6.x)
   6.3

> 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
> Fix For: 6.3, master (7.0)
>
> 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.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-9574) factor out AbstractReRankQuery class

2016-09-27 Thread Christine Poerschke (JIRA)

 [ 
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