0

I want to import data from MongoDB in Solr core so i had done all the configuration: my solrconfig.xml is :

<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-7.6.0.jar" />

  <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />

  <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />

  <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />

  <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-mongo-importer-1.0.0.jar" />


<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
      <str name="config">db-data-config.xml</str>
    </lst>
  </requestHandler>

and my db-data-config is :

<dataConfig>
<dataSource name="MyMongo" type="MongoDataSource" database="test" />
<document name="user">
 <!-- if query="" then it imports everything -->
     <entity  processor="MongoEntityProcessor"
             query=""
             collection="user"
             datasource="MyMongo"
             transformer="MongoMapperTransformer" name="user">

               <!--  If the mongoField name and the field declared in schema.xml are same then no need to declare below.
                     If not same than you have to refer the mongoField to field in schema.xml
                    ( Ex: mongoField="EmpNumber" to name="EmployeeNumber"). -->                                              

     <field column="_id"           name="_id"       mongoField="_id"/>            
                 <field column="firstName" name="firstName" mongoField="firstName"/> 
       </entity>
 </document>
</dataConfig>

when I try to import then it not show any error it showing only a warning : Solr loaded a deprecated plugin/analysis class [solr.LatLonType]. Please consult the documentation on how to replace it accordingly.

and data is not imported into the Solr core. can anyone help me with that?

0 Answers0