You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2015/10/24 18:24:55 UTC

svn commit: r1710362 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/java/org/apache/solr/response/transform/ solr/core/src/test/org/apache/solr/response/

Author: shalin
Date: Sat Oct 24 16:24:54 2015
New Revision: 1710362

URL: http://svn.apache.org/viewvc?rev=1710362&view=rev
Log:
SOLR-7993: Raw json output for fields stopped working in 5.3.0 when requested fields do not include the unique key field name

Added:
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/response/TestRawTransformer.java
      - copied unchanged from r1710361, lucene/dev/trunk/solr/core/src/test/org/apache/solr/response/TestRawTransformer.java
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/DocTransformer.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/RawValueTransformerFactory.java

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1710362&r1=1710361&r2=1710362&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Sat Oct 24 16:24:54 2015
@@ -179,7 +179,10 @@ Bug Fixes
 
 * SOLR-8189: eTag calculation during HTTP Cache Validation uses unsynchronized WeakHashMap causing
   threads to be stuck in runnable state. (shalin)
-  
+
+* SOLR-7993: Raw json output for fields stopped working in 5.3.0 when requested fields do not include
+  the unique key field name. (Bill Bell, Ryan McKinley via shalin)
+
 Optimizations
 ----------------------
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/DocTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/DocTransformer.java?rev=1710362&r1=1710361&r2=1710362&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/DocTransformer.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/DocTransformer.java Sat Oct 24 16:24:54 2015
@@ -63,9 +63,9 @@ public abstract class DocTransformer {
   public abstract void transform(SolrDocument doc, int docid) throws IOException;
 
   /**
-   * When a transformer needs access to fields that are not automaticaly derived from the
+   * When a transformer needs access to fields that are not automatically derived from the
    * input fields names, this option lets us explicitly say the field names that we hope
-   * will be in the SolrDocument.  These fields will be requestd from the 
+   * will be in the SolrDocument.  These fields will be requested from the
    * {@link SolrIndexSearcher} but may or may not be returned in the final
    * {@link QueryResponseWriter}
    * 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/RawValueTransformerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/RawValueTransformerFactory.java?rev=1710362&r1=1710361&r2=1710362&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/RawValueTransformerFactory.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/response/transform/RawValueTransformerFactory.java Sat Oct 24 16:24:54 2015
@@ -124,6 +124,11 @@ public class RawValueTransformerFactory
         doc.setField(display, new WriteableStringValue(val));
       }
     }
+
+    @Override
+    public String[] getExtraRequestFields() {
+      return new String[] {this.field};
+    }
   }
   
   public static class WriteableStringValue extends WriteableValue {