You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2010/02/17 20:08:28 UTC

[jira] Commented: (SOLR-1302) Fun with Distances - Add Distance functions for a variety of things

    [ https://issues.apache.org/jira/browse/SOLR-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834933#action_12834933 ] 

Shalin Shekhar Mangar commented on SOLR-1302:
---------------------------------------------

Looking over the source of DistanceUtils#vectorDistance, it seems like there is a bug with calculating infinite norm:

Existing code:
{code}
for (int i = 0; i < vec1.length; i++) {
        result = Math.max(vec1[i], vec2[i]);
}
{code}

Shouldn't that be:
{code}
for (int i = 0; i < vec1.length; i++) {
        result = Math.max(result, Math.max(vec1[i], vec2[i]));
}
{code}

> Fun with Distances - Add Distance functions for a variety of things
> -------------------------------------------------------------------
>
>                 Key: SOLR-1302
>                 URL: https://issues.apache.org/jira/browse/SOLR-1302
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1302.patch, SOLR-1302.patch, SOLR-1302.patch
>
>
> There are many distance functions that are useful to have:
> 1. Great Circle (lat/lon) and other geo distances
> 2. Euclidean (Vector)
> 3. Manhattan (Vector)
> 4. Cosine (Vector)
> For the vector ones, the idea is that the fields on a document can be used to determine the vector.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.