[英]Data has been deleted automatically when importing JOINed tables from MySQL
I have joined 2 mysql tables by JOIN query and have imported data by DIH in SOLR. 我已经通过JOIN查询加入了2个mysql表,并在SOLR中通过DIH导入了数据。
But, Half of records deleted automatically. 但是,一半的记录会自动删除。 I come to know about this by reading numDocs , maxDocs & deletedDocs values.
我通过阅读numDocs , maxDocs和DeletedDocs值来了解这一点。
I have checked all fields in tables that I have already defined in data-config.xml as well as in schema.xml files. 我已经检查了已经在data-config.xml和schema.xml文件中定义的表中的所有字段。
What is the problem in this? 这有什么问题?
Help me in this please. 请帮助我。
Its a replace of an existing document 它取代了现有文件
numDocs+DeletedDocs = MaxDocs
(821+1160=1981)
numDocs represents the number of searchable documents in the index maxDoc may be larger as the numDoc count as it includes logically deleted documents that have not yet been removed from the index. numDocs表示索引maxDoc中的可搜索文档数可能会随着numDoc计数的增加而增加,因为它包含尚未从索引中删除的逻辑删除的文档。
If you reindex/repost numDocs will never increase, because the new documents will constantly be replacing the old...try optimizing the index, it might remove the logically deleted documents/indexs. 如果您重新索引/重新发布numDocs将永远不会增加,因为新文档将不断替换旧文档...尝试优化索引,它可能会删除逻辑上删除的文档/索引。
The Unique Key Field 唯一键字段
<uniqueKey></uniqueKey>
The <uniqueKey>
declaration can be used to inform Solr that there is a field in your index which should be unique for all documents. <uniqueKey>
声明可用于通知Solr索引中有一个字段,该字段对于所有文档都是唯一的。 If a document is added that contains the same value for this field as an existing document, the old document will be deleted. 如果添加的文档中包含与现有文档相同的此字段值,则旧文档将被删除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.