[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-21 Thread Famas (Jira)


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

Famas commented on SOLR-8636:
-

Ok thank you for your feedback, one last question about indexing 
`BUFFER(POINT(X Y),DISTANCE)` 
The DISTANCE is it a variable in meridian degree ? how to convert it to 
kilometer ? 
Cheers! 

> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-21 Thread Famas (Jira)


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

Famas commented on SOLR-8636:
-

Ok thank you for your feedback, one last question about indexing 
`BUFFER(POINT(X Y),DISTANCE)` 

> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-20 Thread Karl Wright (Jira)


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

Karl Wright commented on SOLR-8636:
---

Sorry, see GeoBaseMembershipShape.outsideDistance().


> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-20 Thread David Smiley (Jira)


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

David Smiley commented on SOLR-8636:


Famas: the docs indicate geodist takes optional parameters, including the field 
to compute the distance from).

Karl:  I looked at GeoDistanceShape and I only see one method that doesn't look 
like what we're talking about.  Can you direct me to an appropriate method that 
computes a distance between a point and some non-point shape?

> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-20 Thread Karl Wright (Jira)


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

Karl Wright commented on SOLR-8636:
---

[~dsmiley], there is an "outside distance", which is the distance from a point 
to a shape.  There is no optimal way of computing distances from shapes to each 
other, however.  For polygons, especially large polygons, it would be 
computationally prohibitive to do it the naive way.

Not all shapes support outside distance, by the way.  Only a subset do.  This 
functionality is described (as usual) in Geo3D by an independent interface - 
see GeoDistanceShape to see how it is derived.

If you want full generality, therefore, you would need general solutions even 
for some of the weirder shapes for which this is not currently implemented.  I 
would therefore ask what the use case is for such a feature before going down 
this route?


> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-20 Thread Famas (Jira)


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

Famas commented on SOLR-8636:
-

Thank you for your answer [~dsmiley]  so maybe the best quick solution is to 
add another field having a `location` type, for example:

 

The problem that I'm facing wish is the right query to execute to retrieve 
plogons results around my point. If we have a geo point with lat, lan `(4.0652 
44.1518)` 
 What's the right way to use geodist() in order to search for the results based 
on *geo* field and display distance on each result based on *geo_for_disatance* 
field?

/select?fl=*,_dist_:geodist()=geo_for_disatance=\{!geofilt sfield=geo 
pt="4.0652 44.1518" d=6}=4.0652 44.1518=*:* ? Is it correct !

> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-20 Thread David Smiley (Jira)


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

David Smiley commented on SOLR-8636:


Solr can use Geo3D, but there is still no distance calculation available 
between non-point shapes.  I double checked this today.  I looked into Geo3D a 
bit... like Plane.java and it appears maybe possible.  Perhaps [~kwright] may 
care to comment.

> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-8636) Incorrect distance returned for indexed polygon shapes

2021-01-20 Thread Famas (Jira)


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

Famas commented on SOLR-8636:
-

[~dsmiley]  hey I'm facing the same issue using solr 6.6, could tell me if is 
it possible to solve the problem just by enabling Geo3D ?
In the documentation it's mentioned that "Geo3D is named as-such due to its 
internal implementation that uses geocentric coordinates (X,Y,Z), *not* for 
3-dimensional geometry," so for geo polygon dimensional geometry the distance 
still does not work ?

> Incorrect distance returned for indexed polygon shapes
> --
>
> Key: SOLR-8636
> URL: https://issues.apache.org/jira/browse/SOLR-8636
> Project: Solr
>  Issue Type: Bug
>  Components: spatial
>Affects Versions: 5.2.1
>Reporter: Rahul Jain
>Assignee: David Smiley
>Priority: Major
>
> We have a location_rpt field with multivalued=true and we are indexing 
> multiple shapes of type LINESTRING() in a single spatial field per document. 
> We are using JTS for spatial and polygon indexing and filtering.
> Solr query:
> q={!geofilt sfield=geo pt=-27,153 score=distance d=50}=*,score
> For above query, we get the results perfectly fine (i.e. documents with at 
> least one intersecting shape is returned) but the returned distance has 
> following behavior:
> 1. When only shapes (LINESTRING(), LINESTRING()) are indexed then the 
> distance returned is 180 degrees or 20015.115 kms.
> 2. When only points are indexed then the distance to nearest point is 
> returned.
> 3. When both points and shapes are indexed, distance to nearest point is 
> returned.
> Using above distance in sorting causes sorting to go haywire.
> Does Solr not return the distance it used during document filtering? Is there 
> a workaround or am I doing something wrong?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org