You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2013/12/03 21:22:21 UTC

svn commit: r1547568 - in /lucene/dev/trunk: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java solr/CHANGES.txt

Author: yonik
Date: Tue Dec  3 20:22:21 2013
New Revision: 1547568

URL: http://svn.apache.org/r1547568
Log:
SOLR-552: change scale function to use itself as context key instead of source

Modified:
    lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
    lucene/dev/trunk/solr/CHANGES.txt

Modified: lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java?rev=1547568&r1=1547567&r2=1547568&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java (original)
+++ lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java Tue Dec  3 20:22:21 2013
@@ -94,14 +94,14 @@ public class ScaleFloatFunction extends 
     ScaleInfo scaleInfo = new ScaleInfo();
     scaleInfo.minVal = minVal;
     scaleInfo.maxVal = maxVal;
-    context.put(this.source, scaleInfo);
+    context.put(ScaleFloatFunction.this, scaleInfo);
     return scaleInfo;
   }
 
   @Override
   public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
 
-    ScaleInfo scaleInfo = (ScaleInfo)context.get(source);
+    ScaleInfo scaleInfo = (ScaleInfo)context.get(ScaleFloatFunction.this);
     if (scaleInfo == null) {
       scaleInfo = createScaleInfo(context, readerContext);
     }

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1547568&r1=1547567&r2=1547568&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Tue Dec  3 20:22:21 2013
@@ -191,6 +191,9 @@ Bug Fixes
 
 * SOLR-5502: A "/" in a document id will cause an exception to be thrown
   when using the composite id router. (Anshum Gupta via Mark Miller)
+
+* SOLR-552: Exception when using Query Function inside Scale Function.
+  (Trey Grainger, yonik)
   
 Optimizations
 ----------------------



Re: svn commit: r1547568 - in /lucene/dev/trunk: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java solr/CHANGES.txt

Posted by Yonik Seeley <yo...@apache.org>.
On Tue, Dec 3, 2013 at 3:35 PM, Steve Rowe <sa...@gmail.com> wrote:
> Yonik,
>
> The JIRA issue number got truncated, both in your svn commit log and your CHANGES.txt entry, both on trunk and branch_4x: SOLR-552 should be SOLR-5525.

Thanks, fixed it.  Luckily I checked the number first ;-)  (it was 5524)

-Yonik
http://heliosearch.com -- making solr shine

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


Re: svn commit: r1547568 - in /lucene/dev/trunk: lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java solr/CHANGES.txt

Posted by Steve Rowe <sa...@gmail.com>.
Yonik,

The JIRA issue number got truncated, both in your svn commit log and your CHANGES.txt entry, both on trunk and branch_4x: SOLR-552 should be SOLR-5525.

Steve

On Dec 3, 2013, at 3:22 PM, yonik@apache.org wrote:

> Author: yonik
> Date: Tue Dec  3 20:22:21 2013
> New Revision: 1547568
> 
> URL: http://svn.apache.org/r1547568
> Log:
> SOLR-552: change scale function to use itself as context key instead of source
> 
> Modified:
>    lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
>    lucene/dev/trunk/solr/CHANGES.txt
> 
> Modified: lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java?rev=1547568&r1=1547567&r2=1547568&view=diff
> ==============================================================================
> --- lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java (original)
> +++ lucene/dev/trunk/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java Tue Dec  3 20:22:21 2013
> @@ -94,14 +94,14 @@ public class ScaleFloatFunction extends 
>     ScaleInfo scaleInfo = new ScaleInfo();
>     scaleInfo.minVal = minVal;
>     scaleInfo.maxVal = maxVal;
> -    context.put(this.source, scaleInfo);
> +    context.put(ScaleFloatFunction.this, scaleInfo);
>     return scaleInfo;
>   }
> 
>   @Override
>   public FunctionValues getValues(Map context, AtomicReaderContext readerContext) throws IOException {
> 
> -    ScaleInfo scaleInfo = (ScaleInfo)context.get(source);
> +    ScaleInfo scaleInfo = (ScaleInfo)context.get(ScaleFloatFunction.this);
>     if (scaleInfo == null) {
>       scaleInfo = createScaleInfo(context, readerContext);
>     }
> 
> Modified: lucene/dev/trunk/solr/CHANGES.txt
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1547568&r1=1547567&r2=1547568&view=diff
> ==============================================================================
> --- lucene/dev/trunk/solr/CHANGES.txt (original)
> +++ lucene/dev/trunk/solr/CHANGES.txt Tue Dec  3 20:22:21 2013
> @@ -191,6 +191,9 @@ Bug Fixes
> 
> * SOLR-5502: A "/" in a document id will cause an exception to be thrown
>   when using the composite id router. (Anshum Gupta via Mark Miller)
> +
> +* SOLR-552: Exception when using Query Function inside Scale Function.
> +  (Trey Grainger, yonik)
> 
> Optimizations
> ----------------------
> 
> 


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