简体   繁体   English

从MySQL导入JOINed表时,数据已自动删除

[英]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. 我通过阅读numDocsmaxDocsDeletedDocs值来了解这一点。

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.xmlschema.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.

相关问题 是否有用于检索已从多个表连接的数据的 SQL 查询? - Is there an SQL query for retrieving data that has been joined from multiple tables? mysql CREATE TABLE JOIN多个表...当数据添加到联接的表中时,php自动更新新表 - mysql CREATE TABLE with JOIN multiple tables … php automatically update the new table when data is added to the tables that are joined 从MySQL的几个表中选择未联接的数据 - Selecting not joined data from several tables in MySQL 当联接的列具有相似的名称时,如何从2个mySQL表中输出混合数据? - How to output a mixture of data from 2 mySQL tables when joined columns have similar names? 从联接的MySQL表中选择解码的JSON数据 - Select decoded JSON data from joined MySQL tables 来自两个联接表的mySQL SELECT,子查询中的数据总和 - mySQL SELECT from two joined tables with sum of data in subquery Mysql:从多个连接表中选择特定数据 - Mysql: Select specific data from multiple joined tables mysql:如何在字段更新后自动更新时间戳 - mysql: how to update automatically TimeStamp when a field has been updated 将数据从mysql导入到配置单元时,用户注销和hadoop服务器会自动关闭 - user logouts and hadoop server shut down automatically when importing data from mysql to hive 从/ var / lib / mysql中删除MySQL数据库/表后,为什么Eclipse会记住它们? - Why does Eclipse remember MySQL databases/tables after they've been deleted from /var/lib/mysql?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM