You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jon Hines (JIRA)" <ji...@apache.org> on 2014/08/28 18:28:08 UTC
[jira] [Created] (SOLR-6446) Large spatial query problem
Jon Hines created SOLR-6446:
-------------------------------
Summary: Large spatial query problem
Key: SOLR-6446
URL: https://issues.apache.org/jira/browse/SOLR-6446
Project: Solr
Issue Type: Bug
Components: spatial
Affects Versions: 4.9
Environment: Windows 7, Oracle JDK 1.7.0_45
Reporter: Jon Hines
We are currently upgrading from Solr 4.1 to 4.9 and have observed differences in spatial query results.
Here are the relevant schema details:
{quote}
<field name="geo" type="location_rpt" indexed="true" stored="false"/>
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory" geo="true" distErrPct="0.1" maxDistErr="0.000009" units="degrees"/>
{quote}
JTS v1.10 jar has been added to the classpath.
A simple test case that shows the problem:
I have 3 documents indexed each with one of the following polygon values set for the "geo" field.
{quote}
POLYGON ((-0.70312499989791 8.0592296260867, 13.359374998139 8.0592296260867, 13.359374998139 21.616579333871, -0.70312499989791 21.616579333871, -0.70312499989791 8.0592296260867))
POLYGON ((120.58593748322 13.923403895824, 132.53906248155 13.923403895824, 132.53906248155 25.165173365383, 120.58593748322 25.165173365383, 120.58593748322 13.923403895824))
POLYGON ((-133.24218748145 0.35156029394437, -121.99218748302 0.35156029394437, -121.99218748302 11.523087505283, -133.24218748145 11.523087505283, -133.24218748145 0.35156029394437))
{quote}
When I execute this query, I get only 2 results. With this exact same configuration and data in Solr 4.1, the query yields all 3 results.
{quote}
geo:"Intersects(POLYGON((-126 -14, 128 -14, 128 35, -126 35, -126 -14)))"
{quote}
My assumption is that the query now goes the opposite way around the earth. This seems to be confirmed by the following query that spans the date line. I get the same 2 results.
{quote}
geo:"Intersects(POLYGON((128 -14, 128 35, -126 35, -126 -14, 128 -14)))"
{quote}
Have I uncovered a bug or is this actually how the system is supposed to behave now? Is there a way to get the old behavior? It is a requirement for us to allow these large polygon queries.
--
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