lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-2345) Extend geodist() to support MultiValuefield for sorting/scoring
Date Thu, 03 Feb 2011 17:33:28 GMT

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

Grant Ingersoll commented on SOLR-2345:
---------------------------------------

Hi Bill,

Can you clarify what you are trying to do here?  You should be able to sort/score by function
already, so I am not sure what the extension is.

> Extend geodist() to support MultiValuefield for sorting/scoring
> ---------------------------------------------------------------
>
>                 Key: SOLR-2345
>                 URL: https://issues.apache.org/jira/browse/SOLR-2345
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bill Bell
>
> Extend geodist() and potentially other functions to support MultiValue fields for sorting
and scoring.
> sort=geodist() asc
> This should grab the closest point in the MultiValue list, and return the distance so
that is can be scored.
> The problem is I cannot find a way to get the MultiValue list?
> In function: src/java/org/apache/solr/search/function/distance/HaversineConstFunction.java
> VectorValueSource p2;
> this.p2 = vs
> List<ValueSource> sources = p2.getSources();
> ValueSource latSource = sources.get(0);                 
> ValueSource lonSource = sources.get(1);                 
> DocValues latVals = latSource.getValues(context1, readerContext1);
> DocValues lonVals = lonSource.getValues(context1, readerContext1);
> double latRad = latVals.doubleVal(doc) * DistanceUtils.DEGREES_TO_RADIANS;
> double lonRad = lonVals.doubleVal(doc) * DistanceUtils.DEGREES_TO_RADIANS;
> etc...
> It would be good if I could loop through sources.get() but it only returns 2 sources
even when there are 2 pairs of lat/long.
> sources:[double(store_0_coordinate), double(store_1_coordinate)]
> How do I extend the sources?

-- 
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


Mime
View raw message