Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6E40E4A1D for ; Sun, 22 May 2011 00:14:31 +0000 (UTC) Received: (qmail 15003 invoked by uid 500); 22 May 2011 00:14:30 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 14958 invoked by uid 500); 22 May 2011 00:14:30 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 14950 invoked by uid 99); 22 May 2011 00:14:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 May 2011 00:14:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 May 2011 00:14:28 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 63370D6B97 for ; Sun, 22 May 2011 00:13:47 +0000 (UTC) Date: Sun, 22 May 2011 00:13:47 +0000 (UTC) From: "Bill Bell (JIRA)" To: dev@lucene.apache.org Message-ID: <555708401.33944.1306023227403.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1246691989.6287.1296689788967.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (SOLR-2345) Extend geodist() and geofilt to support MultiValued lat long field MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990455#comment-12990455 ] Bill Bell edited comment on SOLR-2345 at 5/22/11 12:12 AM: ----------------------------------------------------------- Here is more info: id=56 store=43,-96 store=42,-97.5 id=57 store=42,-97 store=41,-95 id=58 store=40,-95 I am trying to do: http://localhost:8983/solr/select?q=*:*&fq={!geofilt}&pt=42,-97&sfield=store&d=10&sort=geodist() asc I want to change return the point that is closest and limit by 10km. return order: id=57 {42,-97} id=56 {42,-97.5} was (Author: billnbell): Here is more info: id=56 store=43,-96 store=42,-97.5 id=57 store=42,-97 store=41,-95 id=58 store=40,-95 I am trying to do: http://localhost:8983/solr/select?q=*:*&fq={!geofilt}&pt=42,-97&sfield=store&d=10&sort=geodist() asc I want to change geodist() to return id=56 and id=57. return order: id=57 {42,-97} id=56 {42,-97.5} But when I look at HaversineConstFunction.java "geodist()", it is only looking at the 2nd value in the multiValue list. So the result is: id=56 {42,-97.5} id=57 {41,-95} id=58 {40,-95} So I want the algorithm to be for a function on a multiValue="true" field: 1. The geodist() function should check both distances in the multiValue list, and return the closest (asc) or farthest (desc) distance computed 2. Then it should sort on the distance that is returned from #1 But when I looked at HaversineConstFunction.java and debug it, I cannot find a way to get both ValueSource. It only seems to return the last one. Basically I need a method like latVals.doubleVal(doc) to return array of lat values for a document. The Lucene function to get the field "store_0_coordinate" only returns one value for the multiValue field. Once I figure this out, I can see extending all functions to support multiValue fields by using the #1, #2 above. Thanks. > Extend geodist() and geofilt to support MultiValued lat long field > ------------------------------------------------------------------ > > Key: SOLR-2345 > URL: https://issues.apache.org/jira/browse/SOLR-2345 > Project: Solr > Issue Type: New Feature > Reporter: Bill Bell > > Extend geodist() and {!geofilt} to support a multiValued lat,long field without using geohash. > sort=geodist() asc -- 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