Description
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-11180andSOLR-11220(included in theSOLR-11164patch) would need to also interpret a score of 0 to mean "no score".
Summary of proposed change (for master and branch_7x branches):
- 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;