0

I want to delta import from the MongoDB to Solr. full import is working properly but delta import is not working. my Domin is :

{
    "lastName":"testuser",
    "updateDate":"2016-01-05T09:47:18.511Z",
    "email":"xyz1@xyz.com",
    "_id":"568b9126e4b0b5f4080d548c",
    "firstName":"testuser",
    "_version_":1624085798443810816,
    "id":"04059bfa-e23b-4c26-a87f-ba8d5caaac01"
    }

and my delta import query is :

query="{}"
      deltaQuery="{'updateDate':{$gt:{$date:'${dih.last_index_time}'}}}"
      deltaImportQuery="{'_id':'${dataimporter.delta._id}'}"
      name="user"  collection="user"  transformer="MongoMapperTransformer"

Can anyone help me to solve it.

  • DIH tries to construct the import query by(after identifying the delta) modifying the 'query' (this is error prone). `e.g: deltaImportQuery="{'_id':'${dih.delta._id}'}"` in Solr1.4. – Vebbie Jan 30 '19 at 13:19
  • I had tried with deltaImportQuery="{'_id':'${dih.delta._id}'}" But still is not working for me. and I am using the solr7.6.0 – rahulchauhan Jan 31 '19 at 05:27
  • Can you post whole `` from your code ? Meanwhile, you can try `${dataimporter.delta.id}` as ref here https://wiki.apache.org/solr/DataImportHandler `${dih.delta.}` – Vebbie Jan 31 '19 at 09:41
  • According to officaial https://lucene.apache.org/solr/guide/7_5/uploading-structured-data-store-data-with-the-data-import-handler.html Only the SqlEntityProcessor supports delta imports. But i used the MongoEntityProcessor for getting data from mongodb. any other way to delta import or sync it with mongobd to get the changes. – rahulchauhan Jan 31 '19 at 09:51
  • This might help https://stackoverflow.com/questions/21450555/steps-to-connect-mongodb-and-solr-using-dataimporthandler – Vebbie Jan 31 '19 at 10:16
  • full import is working properly but delta import is not working. – rahulchauhan Jan 31 '19 at 10:29

0 Answers0