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 D325F11FE1 for ; Tue, 8 Jul 2014 14:17:06 +0000 (UTC) Received: (qmail 50729 invoked by uid 500); 8 Jul 2014 14:17:05 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 50622 invoked by uid 500); 8 Jul 2014 14:17:05 -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 50439 invoked by uid 99); 8 Jul 2014 14:17:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2014 14:17:05 +0000 Date: Tue, 8 Jul 2014 14:17:04 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-5779) Improve BBox AreaSimilarity algorithm to consider lines and points MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-5779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14054970#comment-14054970 ] ASF subversion and git services commented on LUCENE-5779: --------------------------------------------------------- Commit 1608793 from [~dsmiley] in branch 'dev/trunk' [ https://svn.apache.org/r1608793 ] LUCENE-5714, LUCENE-5779: Enhance BBoxStrategy & Overlap similarity. Configurable docValues / index usage. Add new ShapeAreaValueSource. > Improve BBox AreaSimilarity algorithm to consider lines and points > ------------------------------------------------------------------ > > Key: LUCENE-5779 > URL: https://issues.apache.org/jira/browse/LUCENE-5779 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/spatial > Reporter: David Smiley > Attachments: LUCENE-5779__Improved_bbox_AreaSimilarity_algorithm.patch > > > GeoPortal's area overlap algorithm didn't consider lines and points; they end up turning the score 0. I've thought about this for a bit and I've come up with an alternative scoring algorithm. (already coded and tested and documented): > New Javadocs: > {code:java} > /** > * The algorithm is implemented as envelope on envelope overlays rather than > * complex polygon on complex polygon overlays. > *

> *

> * Spatial relevance scoring algorithm: > *

> *
queryArea
the area of the input query envelope
> *
targetArea
the area of the target envelope (per Lucene document)
> *
intersectionArea
the area of the intersection between the query and target envelopes
> *
queryTargetProportion
A 0-1 factor that divides the score proportion between query and target. > * 0.5 is evenly.
> * > *
queryRatio
intersectionArea / queryArea; (see note)
> *
targetRatio
intersectionArea / targetArea; (see note)
> *
queryFactor
queryRatio * queryTargetProportion;
> *
targetFactor
targetRatio * (1 - queryTargetProportion);
> *
score
queryFactor + targetFactor;
> *
> * Note: The actual computation of queryRatio and targetRatio is more complicated so that it considers > * points and lines. Lines have the ratio of overlap, and points are either 1.0 or 0.0 depending on wether > * it intersects or not. > *

> * Based on Geoportal's > * > * SpatialRankingValueSource but modified. GeoPortal's algorithm will yield a score of 0 > * if either a line or point is compared, and it's doesn't output a 0-1 normalized score (it multiplies the factors). > * > * @lucene.experimental > */ > {code} -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org