Re: which links do i have to follow to understand location based search concepts?

2010-03-08 Thread KshamaPai
)
 [java] at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
 [java] at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
 [java] at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
 [java] at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
 [java] at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
 [java] at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
 [java] at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
 [java] at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:416)
 [java] ... 18 more
  

Is it because my xml file is not properly structured, do i have to include a
Dtd?

Am not able to figure out.
Please help me.
Thank you.





Grant Ingersoll-6 wrote:
 
 
 On Mar 7, 2010, at 7:45 AM, KshamaPai wrote:
 
 
 Hi,
 
 Inorder to understand - cartessian tiers,how are they contributing in
 location based search - What is happening internally when we give query
 to
 solr like http://localhost:8983/solr/select/?q=name:Minneapolis AND
 _val_:recip(hsin(0.78, -1.6, lat_rad, lon_rad, 3963.205), 1, 1, 0)^100
 and
 other functions like ghhsin(),sqedist(),dist() .how is it working to
 retrieve relevent records?
 
 
 This query says to me:  Find all documents that have the word Minneapolis
 in the name and boost the scores based on not only the term scores (i.e.
 Minneapolis) but also
 add in a boost based on 1 over the haversine distance between the point
 0.78, -1.6 (in radians) and the values contained in the lat_rad and
 lon_rad fields (for each document that matched Minneapolis) and boost that
 resulting score by 100.  In other words, 1 over the distance.
 
 The other functions are just different ways of calculating distance. 
 GHSin is the Haversine distance applied to a GeoHash field.  A geohash
 field encodes lat/lon into a single field.  Haversine is generally more
 accurate for measurements on a Sphere.  Dist and sqedist are the
 traditional distances used in a Rectangular Coordinate System (aka the
 stuff you learned about way back when as a kid).  Even Haversine isn't as
 accurate as one could get, since the Earth is not actually a Sphere.  For
 most situations, however, it is more than sufficient.  If you really need
 the utmost accuracy, you could implement Vincenty's formula.  
 
 
 Can any one suggest me any link that will help me understand all these
 concepts better.
 
 
 Here's the Solr wiki page: http://wiki.apache.org/solr/SpatialSearch
 
 Here's an article I wrote on spatial:
 http://www.ibm.com/developerworks/opensource/library/j-spatial/index.html
 

-- 
View this message in context: 
http://old.nabble.com/which-links-do-i-have-to-follow-to-understand-location-based-search-concepts--tp27811139p27819862.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: which links do i have to follow to understand location based search concepts?

2010-03-08 Thread Shalin Shekhar Mangar
On Mon, Mar 8, 2010 at 6:21 PM, KshamaPai kshamapai2...@gmail.com wrote:


 Hi,
 Thank You for explaining it in a simple way.
 The article really helped me to understand the concepts better.

 My question is ,Is it necessary that the data what you are indexing in
 spatial example, is to be in the osm format and using facts files?
  In my case,am trying to index data ,that has just lat,longitude and
 related
 news item(just text) in a xml file which looks like this

 ?xml version=1.0 encoding=UTF-8?
 data name=finals
row id=1 lat=40.756015 lng=-73.984773 body=some text
 data(may be very large data)
 /row
 /data

 I have silghtly modified driver.java and other .java files in src/main/java
 folder, so that these fields are considered for indexing.(but have retained
 geohash,lat_rad,lng_rad as done in spatial example)

 But when i do ant index , am getting

 Buildfile: build.xml

 init:

 compile:

 index:
 [echo] Indexing ./data/
 [java] ./data/   http://localhost:8983/solr
 [java] Num args: 2
 [java] Starting indexing
 [java] Indexing: ./data/final.xml
 [java] Mar 8, 2010 4:40:35 AM
 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
 [java] INFO: I/O exception (java.net.ConnectException) caught when
 processing request: Connection refused


The Connection refused message suggests that your Solr instance is either
not running or you have given the wrong host/port in your driver.

-- 
Regards,
Shalin Shekhar Mangar.


Re: which links do i have to follow to understand location based search concepts?

2010-03-08 Thread KshamaPai

Hi,
During indexing its taking localhost and port 8983, 
index: 
 [echo] Indexing ./data/ 
 [java] ./data/   http://localhost:8983/solr

So other case where in solr instance not running ,what may be the reason
that solr is not running? (Am new to solr)

You mean it has to do nothing with the xml since its giving

at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
 [java] at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
 [java] at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
 [java] at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
 [java] at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
 [java] at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
 [java] at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
 [java] at OSM2Solr.process(OSM2Solr.java:44)
 [java] at Driver.main(Driver.java:79)
 [java] Caused by: java.net.ConnectException: Connection refused
 [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
 [java] at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)


and line 79 in driver.java is 
 numIndexed+=02s.process(new FileInputstream(file)); //where its taking my
xml file.




Shalin Shekhar Mangar wrote:
 
 On Mon, Mar 8, 2010 at 6:21 PM, KshamaPai kshamapai2...@gmail.com wrote:
 

 Hi,
 Thank You for explaining it in a simple way.
 The article really helped me to understand the concepts better.

 My question is ,Is it necessary that the data what you are indexing in
 spatial example, is to be in the osm format and using facts files?
  In my case,am trying to index data ,that has just lat,longitude and
 related
 news item(just text) in a xml file which looks like this

 ?xml version=1.0 encoding=UTF-8?
 data name=finals
row id=1 lat=40.756015 lng=-73.984773 body=some
 text
 data(may be very large data)
 /row
 /data

 I have silghtly modified driver.java and other .java files in
 src/main/java
 folder, so that these fields are considered for indexing.(but have
 retained
 geohash,lat_rad,lng_rad as done in spatial example)

 But when i do ant index , am getting

 Buildfile: build.xml

 init:

 compile:

 index:
 [echo] Indexing ./data/
 [java] ./data/   http://localhost:8983/solr
 [java] Num args: 2
 [java] Starting indexing
 [java] Indexing: ./data/final.xml
 [java] Mar 8, 2010 4:40:35 AM
 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
 [java] INFO: I/O exception (java.net.ConnectException) caught when
 processing request: Connection refused

 
 The Connection refused message suggests that your Solr instance is
 either
 not running or you have given the wrong host/port in your driver.
 
 -- 
 Regards,
 Shalin Shekhar Mangar.
 
 

-- 
View this message in context: 
http://old.nabble.com/which-links-do-i-have-to-follow-to-understand-location-based-search-concepts--tp27811139p27830412.html
Sent from the Solr - User mailing list archive at Nabble.com.



which links do i have to follow to understand location based search concepts?

2010-03-07 Thread KshamaPai

Hi,

Inorder to understand - cartessian tiers,how are they contributing in
location based search - What is happening internally when we give query to
solr like http://localhost:8983/solr/select/?q=name:Minneapolis AND
_val_:recip(hsin(0.78, -1.6, lat_rad, lon_rad, 3963.205), 1, 1, 0)^100 and
other functions like ghhsin(),sqedist(),dist() .how is it working to
retrieve relevent records?

Can any one suggest me any link that will help me understand all these
concepts better.

Thank you.
-- 
View this message in context: 
http://old.nabble.com/which-links-do-i-have-to-follow-to-understand-location-based-search-concepts--tp27811139p27811139.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: which links do i have to follow to understand location based search concepts?

2010-03-07 Thread Grant Ingersoll

On Mar 7, 2010, at 7:45 AM, KshamaPai wrote:

 
 Hi,
 
 Inorder to understand - cartessian tiers,how are they contributing in
 location based search - What is happening internally when we give query to
 solr like http://localhost:8983/solr/select/?q=name:Minneapolis AND
 _val_:recip(hsin(0.78, -1.6, lat_rad, lon_rad, 3963.205), 1, 1, 0)^100 and
 other functions like ghhsin(),sqedist(),dist() .how is it working to
 retrieve relevent records?
 

This query says to me:  Find all documents that have the word Minneapolis in 
the name and boost the scores based on not only the term scores (i.e. 
Minneapolis) but also
add in a boost based on 1 over the haversine distance between the point 0.78, 
-1.6 (in radians) and the values contained in the lat_rad and lon_rad fields 
(for each document that matched Minneapolis) and boost that resulting score by 
100.  In other words, 1 over the distance.

The other functions are just different ways of calculating distance.  GHSin is 
the Haversine distance applied to a GeoHash field.  A geohash field encodes 
lat/lon into a single field.  Haversine is generally more accurate for 
measurements on a Sphere.  Dist and sqedist are the traditional distances used 
in a Rectangular Coordinate System (aka the stuff you learned about way back 
when as a kid).  Even Haversine isn't as accurate as one could get, since the 
Earth is not actually a Sphere.  For most situations, however, it is more than 
sufficient.  If you really need the utmost accuracy, you could implement 
Vincenty's formula.  


 Can any one suggest me any link that will help me understand all these
 concepts better.


Here's the Solr wiki page: http://wiki.apache.org/solr/SpatialSearch

Here's an article I wrote on spatial: 
http://www.ibm.com/developerworks/opensource/library/j-spatial/index.html