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

2009-11-14 Thread Grant Ingersoll (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grant Ingersoll updated SOLR-1302:
--

Attachment: SOLR-1302.patch

Adds in SquaredEuclideanFunction and EuclideanFunction distance functions in 
addition to the others.  Both can calculate the Euclidean distance on an 
n-dimensional vector made up of the fields of a document.  See the unit test 
(DistanceFunctionTest) for an example.

 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


 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.



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

2009-11-14 Thread Grant Ingersoll (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grant Ingersoll updated SOLR-1302:
--

Attachment: SOLR-1302.patch

No need for all of these classes for one offs of distance.  Implement general 
Lp_Space Vector distance function + a special case for the squared euclidean 
distance (which isn't really a distance, but is still useful.)

See http://en.wikipedia.org/wiki/Lp_space

Euclidean distance is dist(2, valuesources...), while Manhattan is (dist(1, 
valuesources...).  Handles some powers as special cases for improved speed.

This pretty much enables Solr to do some pretty cool stuff when it comes to 
vector calculations.

See the tests for how to use.  Will add Wiki later.

 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.



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

2009-11-13 Thread Grant Ingersoll (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Grant Ingersoll updated SOLR-1302:
--

Attachment: SOLR-1302.patch

Haversine implementation, RadianFunction and DegreeFunction.  Also small 
refactorings in other places to better support doubles to avoid losing 
precision for as long as possible.

Next up:  Euclidean and SquaredEuclidean

 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


 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.