[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13945216#comment-13945216 ] Steve Rowe commented on LUCENE-4978: [~dsmiley], any reason not to backport this to 4.7.1? Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13945266#comment-13945266 ] David Smiley commented on LUCENE-4978: -- Oh I didn't know there was going to be a 4.7.1. I'll backport. Thanks for alerting me. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13945450#comment-13945450 ] Steve Rowe commented on LUCENE-4978: I proposed 4.7.1 a week ago on the dev list: [http://mail-archives.apache.org/mod_mbox/lucene-dev/201403.mbox/%3c49ab4538-88cc-4273-ac9b-b51fa3cb3...@gmail.com%3e] David, I'd like to cut a 4.7.1 RC today - do you think you'll have time to do the backport today? If not, I can take a crack at it. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13945566#comment-13945566 ] David Smiley commented on LUCENE-4978: -- I'll do it now. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13945598#comment-13945598 ] ASF subversion and git services commented on LUCENE-4978: - Commit 1581017 from [~dsmiley] in branch 'dev/branches/lucene_solr_4_7' [ https://svn.apache.org/r1581017 ] LUCENE-4978: spatial grid false-negatives at edge Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13945599#comment-13945599 ] ASF subversion and git services commented on LUCENE-4978: - Commit 1581019 from [~dsmiley] in branch 'dev/branches/lucene_solr_4_7' [ https://svn.apache.org/r1581019 ] LUCENE-4978: invert biasContains on query side Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13939203#comment-13939203 ] ASF subversion and git services commented on LUCENE-4978: - Commit 1578891 from [~dsmiley] in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1578891 ] LUCENE-4978: invert biasContains on query side Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13939202#comment-13939202 ] ASF subversion and git services commented on LUCENE-4978: - Commit 1578889 from [~dsmiley] in branch 'dev/trunk' [ https://svn.apache.org/r1578889 ] LUCENE-4978: invert biasContains on query side Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13938837#comment-13938837 ] ASF subversion and git services commented on LUCENE-4978: - Commit 1578741 from [~dsmiley] in branch 'dev/trunk' [ https://svn.apache.org/r1578741 ] LUCENE-4978: spatial grid false-negatives at edge Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13938842#comment-13938842 ] ASF subversion and git services commented on LUCENE-4978: - Commit 1578742 from [~dsmiley] in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1578742 ] LUCENE-4978: spatial grid false-negatives at edge Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.8 Attachments: LUCENE-4978_fix_small_grid_false_negatives.patch Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13799375#comment-13799375 ] oli mcc commented on LUCENE-4978: - Hi David, Sorry for the delay in following up, I've actually been spending some time familiarizing myself with the code and have some followup thoughts/questions. I think I get the issue now; the optimization short circuits to using the centre (a cheaper relation verification) in some cases, and as a result, the following two query types (a point and polygon) would not match due to no intersection with the centre. !https://docs.google.com/drawings/d/1iEX4D7PXQHq3mJvSII-Y0Y5MHPKSGOkqjUV6UcIecY4/pub?w=759h=353! - It's not clear to me why the quick fix doesn't work in both cases you described however, maybe I'm missing the underlying problem. If we _always_ use cell.getShape() won't we be guaranteed to match all points in the cell (potentially inefficient and with false positives, but not false negatives)? - I think this is purely a query time issue, would that be right? I'd like to start indexing documents now, but will avoid doing so if a fix to this will require a re-index. To answer your question, Elasticsearch does have a specific mapping type for geo points ([GeoPointFieldMapper.java|https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/mapper/geo/GeoPointFieldMapper.java] which I think follows the pattern you described. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.6 Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13799415#comment-13799415 ] David Smiley commented on LUCENE-4978: -- Quoting myself with emphasis: bq. If you want a quick solution that only addresses intersection with a Point query, then you could modify the code I reference in the comment above to *not use cell.getCenter() when queryShape is an instance of Point*. So if you want to *always* avoid this problem (not just for point shapes), simply don't ever use cell.getCenter() regardless of what the query shape is. Always use cell.getShape(). So you're on the right track. You are correct that this issue won't affect indexed data. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.6 Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13786287#comment-13786287 ] oli mcc commented on LUCENE-4978: - Hi David I think I've uncovered this same issue via Elasticsearch, see [issue 3795 | https://github.com/elasticsearch/elasticsearch/issues/3795] and have verified it with some test cases I've written. Any chance you'd have time to take a look at this? I'm digging in myself, but am still just at a stage of getting a sense for the codebase. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13786519#comment-13786519 ] David Smiley commented on LUCENE-4978: -- Hi Oli, This issue is indeed the root cause of the one you refer to in ES. I spent a little time on fixing the problem months ago but held off because I wanted to better understand the performance trade-off, and I hadn't yet developed a benchmark -- through I have one now in LUCENE-2844. Correct me if I'm wrong but I heard ES has a point-query optimization. At least I thought I saw something like that when I looked through ES's docs a couple months ago. I would like to add such an optimization within Lucene-spatial which would effectively avoid this particular issue you hit because it would end up being a simple Lucene term query. This underlying issue would still exist though, it just wouldn't show up with a point query. If you want a quick solution that only addresses intersection with a Point query, then you could modify the code I reference in the comment above to not use cell.getCenter() when queryShape is an instance of Point. Make sense? To be clear though, the quick solution or a solution optimizing a point query doesn't actually address the underlying problem; it just fixes it for point queries only. It's still possible to index a point that fits inside a query rectangle extremely close to the edge, and depending on which side of the grid line the rectangle border is, you might not match the point. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Fix For: 4.6 Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4978) Spatial search with point query won't find identical indexed point
[ https://issues.apache.org/jira/browse/LUCENE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13649007#comment-13649007 ] David Smiley commented on LUCENE-4978: -- The offending code is the implementation of IntersectsPrefixTreeFilter's VisitorTemplate.visitScanned: {code:java} if (cell.getLevel() == grid.getMaxLevels() !cell.isLeaf()) cShape = cell.getCenter(); else cShape = cell.getShape(); if (queryShape.relate(cShape).intersects()) collectDocs(results); {code} What's going on here is a performance optimization to use a point for the intersection instead of a rectangle. I never measured the before-after effect, and I'm not sure if I even thought of it in terms of a performance optimization in the first place although that's what it is. One possible solution is to see if the query shape is a rectangle or circle; if so then buffer the query shape by 1/2 a grid cell, which is enough to eliminate the possibility of a false-negative. If it's another shape (whether it be a point or a polygon) then use the cell's rect instead of its center point. Spatial search with point query won't find identical indexed point -- Key: LUCENE-4978 URL: https://issues.apache.org/jira/browse/LUCENE-4978 Project: Lucene - Core Issue Type: Bug Components: modules/spatial Affects Versions: 4.1 Reporter: David Smiley Assignee: David Smiley Priority: Minor Given a document with indexed POINT (10 20), when a search for INTERSECTS( POINT (10 20)) is issued, no results are returned. The work-around is to not search with a point shape, use a very small-radius circle or rectangle. (I'm marking this issue as minor because it's easy to do this). An unstated objective of the PrefixTree/grid approximation is that no matter what precision you use, an intersects query will find all true-positives. Due to approximations, it may also find some close false-positives. But in the case above, that unstated promise is violated. But it can also happen for query shapes other than points which do in fact barely enclose the point given at index time yet the indexed point is in-effect shifted to the center point of a cell which could be outside the query shape, and ultimately leading to a false-negative. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org