lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertie Shen <bertie.s...@gmail.com>
Subject Question about lat/long data type in localsolr
Date Sat, 21 Nov 2009 20:30:13 GMT
Hey everyone,

  I used localsolr and locallucene to do local search. But I could not make
longitude and latitude successfully indexed. During DataImport process,
there is an exception. Do you have some ideas about it?

  I copy solrconfig.xml and schema.xml from your
http://www.gissearch.com/localsolr. Only change I made is to replace names
lat and lng by latitude and longtitude respectively, which are field name in
my index. Should "str" in <str name="latField">lat</str> should be replaced
by "double" according to the following exception?

  Thanks.

Solr log about Exception.

<exception>
    <message>java.lang.ClassCastException: java.lang.Double cannot be cast
to java.lan\
g.String</message>
    <frame>
      <class>com.pjaol.search.solr.update.LocalUpdaterProcessor</class>
      <method>processAdd</method>
      <line>136</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.SolrWriter</class>
      <method>upload</method>
      <line>75</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.DataImportHandler$1</class>
      <method>upload</method>
      <line>292</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.DocBuilder</class>
      <method>buildDocument</method>
      <line>392</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.DocBuilder</class>
      <method>doFullDump</method>
      <line>242</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.DocBuilder</class>
      <method>execute</method>
      <line>180</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.DataImporter</class>
      <method>doFullImport</method>
      <line>331</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.DataImporter</class>
      <method>runCmd</method>
      <line>389</line>
    </frame>
    <frame>
      <class>org.apache.solr.handler.dataimport.DataImporter$1</class>
      <method>run</method>
      <line>370</line>
    </frame>
  </exception>


How do I set up local indexing

Here is what I have done to set up local indexing.
1) Download localsolr. I download it from
http://developer.k-int.com/m2snapshots/localsolr/localsolr/1.5/ and put jar
file (in my case, localsolr-1.5.jar) in your application's WEB_INF/lib
directory of application server.

2) Download locallucene. I download it from
http://sourceforge.net/projects/locallucene/ and put jar file (in my case,
locallucene.jar in locallucene_r2.0/dist/ diectory) in your application's
WEB_INF/lib directory of application server. I also need to copy
gt2-referencing-2.3.1.jar, geoapi-nogenerics-2.1-M2.jar, and jsr108-0.01.jar
under locallucene_r2.0/lib/ directory to WEB_INF/lib. Do not copy
lucene-spatial-2.9.1.jar under Lucene codebase. The namespace has been
changed from com.pjaol.blah.blah.blah to org.apache.blah blah.

3) Update your solrconfig.xml and schema.xml. I copy it from
http://www.gissearch.com/localsolr.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message