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 Shalin Shekhar Mangar <sh...@gmail.com> on 2010/03/08 13:54:18 UTC

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

On Mon, Mar 8, 2010 at 6:21 PM, KshamaPai <ks...@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.7560150000" lng="-73.9847730000" 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?

Posted by KshamaPai <ks...@gmail.com>.
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 <ks...@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.7560150000" lng="-73.9847730000" 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.