You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Can Ezgi Aydemir <CA...@islem.com.tr> on 2017/09/27 10:45:40 UTC
Solr Spatial Query Problem Hk.
hi everyone,
I am trying spatial query in solr such as intersects, within etc. I write below query but it is wrong. I try 3 different method this query but all query return same error.
How to run spatial query in solr? Such as intersect, iswithin etc.
Best Regards.
1- http://localhost:8983/solr/nh/select?fq=geometry.coordinates:%22IsWithin(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))%20distErrPct=0%22
2- http://localhost:8983/solr/nh/select?q={!field%20f=geometry.coordinates}Intersects(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))
3- http://localhost:8983/solr/nh/select?q=*:*&fq={!field%20f=geometry.coordinates}Intersects(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))
<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">1</int>
<lst name="params">
<str name="fq">geometry.coordinates:"IsWithin(POLYGON((-80 29, -90 50, -60 70, 0 0, -80 29))) distErrPct=0"
</str>
</lst>
</lst>
<lst name="error">
<lst name="metadata">
<str name="error-class">org.apache.solr.common.SolrException</str>
<str name="root-error-class">org.apache.solr.common.SolrException</str>
</lst>
<str name="msg">Invalid Number: IsWithin(POLYGON((-80 29, -90 50, -60 70, 0 0, -80 29))) distErrPct=0</str>
<int name="code">400</int>
</lst>
</response>
[cid:74426A0B-010D-4871-A556-A3590DE88C60@islem.com.tr.]
Can Ezgi AYDEMİR
Oracle Veri Tabanı Yöneticisi
İşlem Coğrafi Bilgi Sistemleri Müh. & Eğitim AŞ.
2024.Cadde No:14, Beysukent 06800, Ankara, Türkiye
T : 0 312 233 50 00 .:. F : 0312 235 56 82
E : caydemir@islem.com.tr<https://mail.islem.com.tr/owa/redir.aspx?REF=nPSsfnBmV5Ce9vWorvlOrrYthN1Wt5jhrDrHz4IuPgJuXODmM8nUCAFtYWlsdG86Z2R1cmFuQGlzbGVtLmNvbS50cg..> .:. W : <font color="#93C0<https://mail.islem.com.tr/owa/redir.aspx?REF=q0Pp2HH-W10G07gbyIRn7NyrFWyaL2QLhqXKE1SMNj1uXODmM8nUCAFodHRwOi8vd3d3LmlzbGVtLmNvbS50ci8.>
Bu e-posta ve ekindekiler gizli bilgiler içeriyor olabilir ve sadece adreslenen kişileri ilgilendirir. Eğer adreslenen kişi siz değilseniz, bu e-postayı yaymayınız, dağıtmayınız veya kopyalamayınız. Eğer bu e-posta yanlışlıkla size gönderildiyse, lütfen bu e-posta ve ekindeki dosyaları sisteminizden siliniz ve göndereni hemen bilgilendiriniz. Ayrıca, bu e-posta ve ekindeki dosyaları virüs bulaşması ihtimaline karşı taratınız. İŞLEM GIS® bu e-posta ile taşınabilecek herhangi bir virüsün neden olabileceği hasarın sorumluluğunu kabul etmez. Bilgi için:bgys@islem.com.tr This message may contain confidential information and is intended only for recipient name. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately if you have received this e-mail by mistake and delete this e-mail from your system. Finally, the recipient should check this email and any attachments for the presence of viruses. İŞLEM GIS® accepts no liability for any damage may be caused by any virus transmitted by this email.” For information: bgys@islem.com.tr
Re: Solr Spatial Query Problem Hk.
Posted by David Smiley <da...@gmail.com>.
Hi,
Firstly, if Solr returns an error referencing an exception then you can
look in Solr's logs for the stack trace, which helps debugging problems a
ton (at least for Solr devs).
I suspect that the problem here is that your schema might have a dynamic
field where *coordinates is defined to be a number. The error suggests
this, at least.
On Wed, Sep 27, 2017 at 6:42 AM Can Ezgi Aydemir <CA...@islem.com.tr>
wrote:
> 1-
> http://localhost:8983/solr/nh/select?fq=geometry.coordinates:%22IsWithin(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))%20distErrPct=0%22
missing q=*:*
>
> 2-
> http://localhost:8983/solr/nh/select?q={!field%20f=geometry.coordinates}Intersects(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))
> <http://localhost:8983/solr/nh/select?q=%7B!field%20f=geometry.coordinates%7DIntersects(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))>
> 3-
> http://localhost:8983/solr/nh/select?q=*:*&fq={!field%20f=geometry.coordinates}Intersects(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))
> <http://localhost:8983/solr/nh/select?q=*:*&fq=%7B!field%20f=geometry.coordinates%7DIntersects(POLYGON((-80%2029,%20-90%2050,%20-60%2070,%200%200,%20-80%2029)))>
>
> <response>
> <lst name="responseHeader">
> <int name="status">400</int>
> <int name="QTime">1</int>
> <lst name="params">
> <str name="fq">geometry.coordinates:"IsWithin(POLYGON((-80 29, -90 50,
> -60 70, 0 0, -80 29))) distErrPct=0"
> </str>
> </lst>
> </lst>
> <lst name="error">
> <lst name="metadata">
> <str name="error-class">org.apache.solr.common.SolrException</str>
> <str name="root-error-class">org.apache.solr.common.SolrException</str>
> </lst>
> <str name="msg">Invalid Number: IsWithin(POLYGON((-80 29, -90 50, -60
> 70, 0 0, -80 29))) distErrPct=0</str>
> <int name="code">400</int>
> </lst>
> </response>
>
>
>
> [cid:74426A0B-010D-4871-A556-A3590DE88C60@islem.com.tr.]
>
> Can Ezgi AYDEMİR
> Oracle Veri Tabanı Yöneticisi
>
> İşlem Coğrafi Bilgi Sistemleri Müh. & Eğitim AŞ.
> 2024.Cadde No:14, Beysukent 06800, Ankara, Türkiye
> T : 0 312 233 50 00 .:. F : 0312 235 56 82
> E : caydemir@islem.com.tr<
> https://mail.islem.com.tr/owa/redir.aspx?REF=nPSsfnBmV5Ce9vWorvlOrrYthN1Wt5jhrDrHz4IuPgJuXODmM8nUCAFtYWlsdG86Z2R1cmFuQGlzbGVtLmNvbS50cg..>
> .:. W : <font color="#93C0<
> https://mail.islem.com.tr/owa/redir.aspx?REF=q0Pp2HH-W10G07gbyIRn7NyrFWyaL2QLhqXKE1SMNj1uXODmM8nUCAFodHRwOi8vd3d3LmlzbGVtLmNvbS50ci8
> .>
>
> Bu e-posta ve ekindekiler gizli bilgiler içeriyor olabilir ve sadece
> adreslenen kişileri ilgilendirir. Eğer adreslenen kişi siz değilseniz, bu
> e-postayı yaymayınız, dağıtmayınız veya kopyalamayınız. Eğer bu e-posta
> yanlışlıkla size gönderildiyse, lütfen bu e-posta ve ekindeki dosyaları
> sisteminizden siliniz ve göndereni hemen bilgilendiriniz. Ayrıca, bu
> e-posta ve ekindeki dosyaları virüs bulaşması ihtimaline karşı taratınız.
> İŞLEM GIS® bu e-posta ile taşınabilecek herhangi bir virüsün neden
> olabileceği hasarın sorumluluğunu kabul etmez. Bilgi iç
> in:bgys@islem.com.tr This message may contain confidential information
> and is intended only for recipient name. If you are not the named addressee
> you should not disseminate, distribute or copy this e-mail. Please notify
> the sender immediately if you have received this e-mail by mistake and
> delete this e-mail from your system. Finally, the recipient should check
> this email and any attachments for the presence of viruses. İŞLEM GIS®
> accepts no liability for any damage may be caused by any virus transmitted
> by this email.” For information: bgys@islem.com.tr
>
--
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com