Re: Solr spatial search within the polygon

2014-03-10 Thread javinsnc
Ok David. I give it a shot. Thanks again! -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-spatial-search-within-the-polygon-tp4101147p4122647.html Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr spatial search within the polygon

2014-03-10 Thread David Smiley (@MITRE.org)
Lucene has multiple modules, one of which is "spatial". You'll see it in the source tree checkout underneath the lucene directory. Javadocs: http://lucene.apache.org/core/4_7_0/spatial/index.html SpatialExample.java: https://github.com/apache/lucene-solr/blob/trunk/lucene/spatial/src/test/org/apa

Re: Solr spatial search within the polygon

2014-03-10 Thread javinsnc
Could you please send me where I can find this .java? What do you refer by "Lucene-spatial module"? Thanks for your time David! -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-spatial-search-within-the-polygon-tp4101147p4122642.html Sent from the Solr - User mailing

Re: Solr spatial search within the polygon

2014-03-10 Thread David Smiley (@MITRE.org)
You're going to have to use the Lucene-spatial module directly then. There's SpatialExample.java to get you started. javinsnc wrote > > David Smiley (@MITRE.org) wrote >> On 3/10/14, 12:56 PM, "javinsnc" < >> javiersangrador@ >> > wrote: >> This is indeed the source of the problem. >> >> Why

Re: Solr spatial search within the polygon

2014-03-10 Thread javinsnc
David Smiley (@MITRE.org) wrote > On 3/10/14, 12:56 PM, "javinsnc" < > javiersangrador@ > > wrote: > This is indeed the source of the problem. > > Why do you index with Lucene’s API and not Solr’s? Solr not only has a > web-service API but it also has the SolrJ API that can embed Solr — > Embed

Re: Solr spatial search within the polygon

2014-03-10 Thread Smiley, David W.
On 3/10/14, 12:56 PM, "javinsnc" wrote: >>> >>>/*/ >>>/* Document contents */ >>>/*/ >>>I have tried with 3 different content for my documents (lat-lon refers >>>to >>>Madrid, Spain): >> >> Um…. Just to be absolutely sure, are you adding the data in Solr’

Re: Solr spatial search within the polygon

2014-03-10 Thread javinsnc
David Smiley (@MITRE.org) wrote > On 3/10/14, 6:45 AM, "Javi" < > javiersangrador@ > > wrote: > >>/**/ >>/* 1. library */ >>/**/ >> >>(1) I use "jts-1.13.jar" and "spatial4j-0.4.1.jar" >>(I think they are the latest version) > > You should only need to add JTS; spatial4j

Re: Solr spatial search within the polygon

2014-03-10 Thread Smiley, David W.
On 3/10/14, 12:12 PM, "Smiley, David W." wrote: >> >> >> >>c) I tried no WKT format by adding a comma and using "longitude,latitude" >> >> >> >> 40.442179,-3.69278 >> >> > >That is *wrong*. Remove the comma and it will then be okay. But again, >see my earlier advise on lat & lon

Re: Solr spatial search within the polygon

2014-03-10 Thread Smiley, David W.
On 3/10/14, 6:45 AM, "Javi" wrote: >Hi all. > >I need your help! I have read every post about Spatial in Solr because I >need to check if a point (latitude,longitude) is inside a Polygon. > >/**/ >/* 1. library */ >/**/ > >(1) I use "jts-1.13.jar" and "spatial4j-0.4.1.ja

Re: Solr spatial search within the polygon

2014-03-10 Thread Javi
Hi all. I need your help! I have read every post about Spatial in Solr because I need to check if a point (latitude,longitude) is inside a Polygon. /**/ /* 1. library */ /**/ (1) I use "jts-1.13.jar" and "spatial4j-0.4.1.jar" (I think they are the latest version) /*

Re: Solr spatial search within the polygon

2013-11-20 Thread Smiley, David W.
Dhanesh, > I'm pretty sure that the coordinates are in the right position. > "9.445890,76.540970" is in India, precisely in Kerala state :) My suspicion was wright; you have all of your latitudes and longitudes in the wrong position. Your example that I quote you on above is correct ("lat,lon"

Re: Solr spatial search within the polygon

2013-11-19 Thread Dhanesh Radhakrishnan
Hi David, Thank you for your reply This is my current schema and field type "location_rpt" is a SpatialRecursivePrefixTreeFieldType and Field "location" is a type "location_rpt" and its multiValued Whenever add a document to solr, I'll

Re: Solr spatial search within the polygon

2013-11-19 Thread Smiley, David W.
On 11/19/13 4:06 AM, "Dhanesh Radhakrishnan" wrote: >Hi David, >Thank you so much for the detailed reply. I've checked each and every lat >lng coordinates and its a purely polygon. >After some time I did one change in the lat lng indexing. >Changed the indexing format. > >Initially I indexed t

Re: Solr spatial search within the polygon

2013-11-19 Thread Dhanesh Radhakrishnan
Hi David, Thank you so much for the detailed reply. I've checked each and every lat lng coordinates and its a purely polygon. After some time I did one change in the lat lng indexing. Changed the indexing format. Initially I indexed the latitude and longitude separated by comma Eg:- "location":[

Re: Solr spatial search within the polygon

2013-11-18 Thread Smiley, David W.
Hi. It's clear there is an ordering problem in your latitudes and longitudes. If indeed you intend to index latitude 9.44Š and longitude 76.45Š as you said, then you are indexing it correctly. You may also choose to index in WKT format, which would be POINT(76.45 9.44) but either is fine. Howev