Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在solr中获取lucene索引的版本_Solr_Lucene_Solr8 - Fatal编程技术网

如何在solr中获取lucene索引的版本

如何在solr中获取lucene索引的版本,solr,lucene,solr8,Solr,Lucene,Solr8,我的用例:我目前使用Solr5.5并升级到Solr8.8 为此,我需要在安装solr的所有机器上重新编制索引。我需要检查索引版本,如果索引是从旧版本创建的,那么我将运行重新索引逻辑,如果它已经是新版本,我将跳过重新索引 有没有办法检测索引版本 注意:配置文件已更新为新版本,因此无法使用来自solrconfig.xml的标记来检索信息: yoursolrhost:8983/solr/admin/info/system 大概是下面的样子 http://yoursolrhost:8983/solr/

我的用例:我目前使用Solr5.5并升级到Solr8.8

为此,我需要在安装solr的所有机器上重新编制索引。我需要检查索引版本,如果索引是从旧版本创建的,那么我将运行重新索引逻辑,如果它已经是新版本,我将跳过重新索引

有没有办法检测索引版本


注意:配置文件已更新为新版本,因此无法使用来自solrconfig.xml的标记来检索信息:

yoursolrhost:8983/solr/admin/info/system
大概是下面的样子

http://yoursolrhost:8983/solr/admin/info/system?wt=json

在您的情况下,这是一个重大升级…您已对所有数据重新编制索引…是的,我理解,但我们希望避免多次重新编制索引,因此必须检测是否已进行了重新编制索引。由您的应用程序或solr客户机处理索引逻辑,从而“知道”索引内容和(重新)索引内容,现在,即使手动触发重新索引,您的数据库中是否有一些数据跟踪(至少)文档的最后索引日期?谢谢,但这仍然会根据配置文件中的内容检测版本,而不是实际物理索引的版本