I'm not sure if it's too late. Mongo-jdbc will not work with DIH Apache Solr, you will need to expand it. I expanded it and you can use it here: https://github.com/hrishik/solr-mongodb-dih
You can use it directly with Apache Solr. In this case, the DIH configuration file will look something like this:
<dataConfig> <dataSource name="mongod" type="JdbcDataSource" driver="com.mongodb.jdbc.MongoDriver" url="mongodb://localhost/exampledb"/> <document> <entity name="nameage" dataSource="mongod" query="select name, price from grocery"> <field column="name" name="name"/> <field column="name" name="id"/> </entity> </document> </dataConfig>
Hrishikesh karambelkar
source share