Christine Poerschke created SOLR-11254:
------------------------------------------

             Summary: add score-less (abstract) DocTransformer.transform method
                 Key: SOLR-11254
                 URL: https://issues.apache.org/jira/browse/SOLR-11254
             Project: Solr
          Issue Type: Task
            Reporter: Christine Poerschke
            Assignee: Christine Poerschke


Background and motivation:

* Most {{DocTransformer}} implementations don't use the {{score}} argument of 
the {{transform}} method.

* Two-and-a-half of the three method callers pass {{0}} to indicate {{"no 
score"}}.
** 
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.6.0/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java#L253
** 
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.6.0/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java#L302
** 
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.6.0/solr/core/src/java/org/apache/solr/response/DocsStreamer.java#L170

* Without the change being proposed in this ticket the fix for SOLR-11180 and 
SOLR-11220 (included in the SOLR-11164 patch) would need to also interpret a 
score of {{0}} to mean {{"no score"}}.

Summary of proposed change (for _master_ and _branch_7x_ branches):
{code}
-  public abstract void transform(SolrDocument doc, int docid, float score) 
throws IOException;
+  public void transform(SolrDocument doc, int docid, float score) throws 
IOException {
+    transform(doc, docid);
+  }
+
+  public abstract void transform(SolrDocument doc, int docid) throws 
IOException;
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to