MongodbからSolr6.0にデータをインポートしようとしています。完全インポートが正しく実行されていますが、デルタインポートは機能していません。デルタインポートを実行すると、結果が下になります。Solrデルタインポートクエリが機能しない
要求:0、フェッチ:0、スキップ:0、加工:0
マイデータの設定ファイルクエリは
query=""
deltaQuery="db.getCollection('customer').find({'jDate':{$gt:'${dih.last_index_time}'}},{'_id' :1});"
deltaImportQuery="db.getCollection('customer').find({'_id':'${dataimporter.delta.id}'})"
全データ-config.xmlの
以下の通りです<?xml version="1.0"?>
<dataConfig>
<dataSource name="MyMongo" type="MongoDataSource" database="test_db" />
<document name="import">
<!-- if query="" then it imports everything -->
<entity processor="MongoEntityProcessor"
query=""
deltaQuery="db.getCollection('customer').find({'jDate':{$gt: '${dih.last_index_time}'}},{'_id' :1});"
deltaImportQuery="db.getCollection('customer').find({'_id':'${dataimporter.delta.id}'})"
collection="customer"
datasource="MyMongo"
transformer="MongoMapperTransformer" name="sample_entity">
<!-- If mongoField name and the field declared in schema.xml are same than 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"/>
<field column="CustID" name="CustID" mongoField="CustID"/>
<field column="CustName" name="CustName" mongoField="CustName"/>
<field column="jDate" name="jDate" mongoField="jDate"/>
<field column="dob" name="dob" mongoField="dob"/>
</entity>
</document>
</dataConfig>
ハードコードされた値が、それはまだ
query=""
deltaQuery="db.getCollection('customer').find({'jDate':{$gt: new Date(1480581295000)}},{'_id' :1});"
deltaImportQuery="db.getCollection('customer').find({'_id':ObjectId('34234234dfsd34534524234ee')})"
の下のように働いていない。そして、私は以下のことをやってみましませんが、まだ成功
query=""
deltaQuery="{'jDate':{$gt: new Date(1480581295000)}}"
deltaImportQuery="{'_id':ObjectId(34234234dfsd34534524234ee)}"
誰でも、してくださいすることができます場合。
@TMBTあなたによって提案されたこの新しい疑問を持っているthis.Iで私を助けてください。 – Kamini
フルインポートを行ってから変更がありますか? – root545
はい。完全にインポートした後、MongoDBに新しい文書を1つ追加してから、デルタインポート – Kamini