Welcome to the Solr Mongo Importer project. This project provides MongoDb support for the Solr Data Import Handler.
Firstly you will need a copy of the Solr Mongo Importer jar.
You will also need the [Mongo Java driver JAR] (https://github.com/mongodb/mongo-java-driver/downloads)
Place both of these jar's in your Solr libaries folder ( I put mine in 'dist' folder with the other jar's)
Add lib directives to your solrconfig.xml
<lib path="../../dist/solr-mongo-importer-{version}.jar" />
<lib path="../../dist/mongo.jar" />
Here is a sample data-config.xml showing the use of all components
<?xml version="1.0" encoding="UTF-8" ?>
<dataConfig>
<dataSource name="MyMongo" type="MongoDataSource" database="Inventory" />
<document name="Products">
<entity processor="MongoEntityProcessor"
query="{'Active':1}"
collection="ProductData"
datasource="MyMongo"
deltaQuery="{'UpdateDate':{$gt:{$date:'${dih.last_index_time}'}}}"
deltaImportQuery="{'_id':'${dih.delta._id}'}"
transformer="MongoMapperTransformer" >
<field column="title" name="title" mongoField="Title"/>
<field column="description" name="description" mongoField="Long Description"/>
<field column="brand" name="brand" />
</entity>
</document>
</dataConfig>