la-indexes-comparer
la-indexes-comparer 是一个用于比较 Living Atlases 门户网站的 Solr 索引/集合的工具。它支持来自 solr 和 solrcloud 的核心和集合,以及 pipelines 和 biocache-store 索引。
这对于比较不同创建的索引并查看差异以采取行动(例如切换到使用新索引)非常有用。
用法
la_indexes_comparer -a https://your-solr-index-a -b https://your-solr-index-b -1 core-or-collection-a -2 core-or-collection-b -c https://collectory.l-a.site -l "cl2,cl3,cl6"
# or using dart
dart run bin/la_indexes_comparer.dart -a https://your-solr-index-a -b https://your-solr-index-b -1 core-or-collection-a -2 core-or-collection-b -c https://collectory.l-a.site -l "cl2,cl3,cl6"
更多选项
Usage:
-a, --solr-url-a (mandatory) Solr URL A
-b, --solr-url-b (mandatory) Solr URL B
-1, --collection-a (mandatory) Collection A
-2, --collection-b (mandatory) Collection B
-c, --collectory-url (mandatory) Collectory URL
-l, --layers (mandatory)
--[no-]drs Compare drs
(defaults to on)
--[no-]species Compare species
(defaults to on)
--[no-]truncate-species Only show the start and end of the comparison of species
(defaults to on)
--[no-]inst Compare institutions
(defaults to on)
--[no-]compare-layers Compare layers
(defaults to on)
--[no-]hubs Compare hubs
(defaults to on)
--[no-]csv-format Print results in CSV format
-d, --[no-]debug Show some extra debug info
它也支持基本身份验证
la_indexes_comparer -a https://user:pass@your-solr-index-a -b https://user:pass@your-solr-index-b -1 core-or-collection-a -2 core-or-collection-b -c https://collectory.l-a.site -l "cl2,cl3,cl6"
输出
它可以生成 markdown 表格(有助于附加到问题中)或 CSV 表格。请参阅此 示例输出。
安装
只需下载一个 发布二进制文件,然后在您的计算机或内部服务器上运行它。
开发
要使用此实用程序,您将需要 dart,请遵循以下步骤
- 克隆此仓库
git clone https://github.com/living-atlases/la-indexes-comparer.git
- 导航到克隆的存储库
cd la-indexex-comparer
- 安装依赖项
dart pub get
- 从命令行修改并执行此实用程序
dart run bin/la_indexes_comparer.dart (...)
编译
dart compile exe bin/la_indexes_comparer.dart
cp bin/la_indexes_comparer.exe bin/la_indexes_comparer # only to avoid the .exe
未来步骤
如果有用,我们可以将其集成到 la-toolkit 中作为附加工具或用于检测问题。
许可证
MPL © Living Atlases