You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2011/03/31 21:50:06 UTC

[jira] [Created] (SOLR-2451) Add assertQScore() to SolrTestCaseJ4 to account for small deltas

Add assertQScore() to SolrTestCaseJ4 to account for small deltas 
-----------------------------------------------------------------

                 Key: SOLR-2451
                 URL: https://issues.apache.org/jira/browse/SOLR-2451
             Project: Solr
          Issue Type: Improvement
    Affects Versions: Next
            Reporter: David Smiley
            Priority: Minor
         Attachments: SOLR-2451_assertQScore.patch

Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
{code:java}
  /**
   * Validates that the document at the specified index in the results has the specified score, within 0.0001.
   */
  public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
{code}

This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Resolved] (SOLR-2451) Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-2451.
----------------------------

       Resolution: Fixed
    Fix Version/s: 3.2

Committed revision 1102910. - 3x


> Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.2, 4.0
>
>         Attachments: SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Updated] (SOLR-2451) Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles

Posted by "David Smiley (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley updated SOLR-2451:
-------------------------------

    Attachment: Fix_SOLR-2451_for_a_custom_delta.patch
    
> Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.2, 4.0
>
>         Attachments: Fix_SOLR-2451_for_a_custom_delta.patch, SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Resolved] (SOLR-2451) Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles

Posted by "Hoss Man (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-2451.
----------------------------

    Resolution: Fixed
    
> Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 4.0, 3.2
>
>         Attachments: Fix_SOLR-2451_for_a_custom_delta.patch, SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (SOLR-2451) Add assertQScore() to SolrTestCaseJ4 to account for small deltas

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-2451:
---------------------------

    Attachment: SOLR-2451.patch

sorry, last patch was stale

> Add assertQScore() to SolrTestCaseJ4 to account for small deltas 
> -----------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 3.2
>            Reporter: David Smiley
>            Priority: Minor
>         Attachments: SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Updated] (SOLR-2451) Add assertQScore() to SolrTestCaseJ4 to account for small deltas

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-2451:
---------------------------

    Attachment: SOLR-2451.patch

David,

One concern i have with your impl is that really only works with simple score comparisons from the main result set -- for a public api we should probably try to be more general (as is this wouldn't work if people wanted flexible score comparisons using group by for instance -- let alone any custom plugins users might want to write tests for)

The underlying code that processes assertJQ already applies a tolerance level when doing equality tests between the JSON structure and the expected value, but that is currently hardcoded.

Here's a patch bubbles that tollerance up that up so that it can be specified in the individual assertJQ calls.  What do you think of this approach?


> Add assertQScore() to SolrTestCaseJ4 to account for small deltas 
> -----------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 3.2
>            Reporter: David Smiley
>            Priority: Minor
>         Attachments: SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Commented] (SOLR-2451) Add assertQScore() to SolrTestCaseJ4 to account for small deltas

Posted by "David Smiley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031983#comment-13031983 ] 

David Smiley commented on SOLR-2451:
------------------------------------

Ok, I like it.

> Add assertQScore() to SolrTestCaseJ4 to account for small deltas 
> -----------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 3.2
>            Reporter: David Smiley
>            Priority: Minor
>         Attachments: SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Updated] (SOLR-2451) Add assertQScore() to SolrTestCaseJ4 to account for small deltas

Posted by "David Smiley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley updated SOLR-2451:
-------------------------------

    Attachment: SOLR-2451_assertQScore.patch

> Add assertQScore() to SolrTestCaseJ4 to account for small deltas 
> -----------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: Next
>            Reporter: David Smiley
>            Priority: Minor
>         Attachments: SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Reopened] (SOLR-2451) Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man reopened SOLR-2451:
----------------------------


forgot i was in the middle of backporting


> Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Resolved] (SOLR-2451) Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-2451.
----------------------------

    Resolution: Fixed

thanks for bringing this up david

> Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Reopened] (SOLR-2451) Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles

Posted by "David Smiley (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley reopened SOLR-2451:
--------------------------------


Delta support was added bit it wasn't completed.  In particular, a custom delta provided is ignored, and instead you get the one provided as the default.  Furthermore, the condition in which delta is actually looked at wasn't quite right with respect to the Number subclass of "val" and "expected" subclasses.  In a minute I will attach a patch fixing it.
                
> Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.2, 4.0
>
>         Attachments: SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (SOLR-2451) Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-2451:
---------------------------

    Affects Version/s:     (was: 3.2)
        Fix Version/s: 4.0
             Assignee: Hoss Man
              Summary: Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles  (was: Add assertQScore() to SolrTestCaseJ4 to account for small deltas )

Committed revision 1102907.


> Enhance SolrTestCaseJ4 to allow tests to account for small deltas when comparing floats/doubles
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2451
>                 URL: https://issues.apache.org/jira/browse/SOLR-2451
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-2451.patch, SOLR-2451.patch, SOLR-2451_assertQScore.patch
>
>
> Attached is a patch that adds the following method to SolrTestCaseJ4:  (just javadoc & signature shown)
> {code:java}
>   /**
>    * Validates that the document at the specified index in the results has the specified score, within 0.0001.
>    */
>   public static void assertQScore(SolrQueryRequest req, int docIdx, float targetScore) {
> {code}
> This is especially useful for geospatial in which slightly different precision deltas might occur when trying different geospatial indexing strategies are used, assuming the score is some geospatial distance.  This patch makes a simple modification to DistanceFunctionTest to use it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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