最简单的方法(URL?)触发所有待处理文档的 SOLR 提交?
导致 SOLR 安装提交所有待处理文档的最简单方法是什么?
(管理界面中没有明显的方法。http:// 页面上提到了一个名为“commit”的脚本wiki.apache.org/solr/SolrOperationsTools - 但没有提示“提交”显然是一个可以添加到任何更新 POST 的选项,但我找不到任何参考。仅用于提交的单个 URL。)
What's the most simple way to cause a SOLR installation to commit all pending docs?
(There's no obvious way in the admin interface. There's a script called 'commit' mentioned on the page http://wiki.apache.org/solr/SolrOperationsTools -- but no hint where that lives. 'Commit' is clearly an option that can be added to any update POST, but I can't find any reference to a single URL that serves to only commit.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这适用于 SOLR 版本 5.0
尝试
[solr url]/update?commit=true
例如,使用类似于 SOLR 示例默认值的 URL,来自同一台计算机,
http://localhost:8983 /solr/update?commit=true
应该这样做。对于 SOLR 版本 >= 5.0
http://localhost:8983/solr/[collection_name]/update?commit=true
THIS HOLDS FOR SOLR VERSIONS < 5.0
Try
[solr url]/update?commit=true
For example, with an URL like the SOLR example defaults, from the same machine,
http://localhost:8983/solr/update?commit=true
should do it.FOR SOLR VERSIONS >= 5.0
http://localhost:8983/solr/[collection_name]/update?commit=true
从 Solr 5 开始,需要将集合名称添加到 url 中,所以现在正确的答案是:
http://localhost :8983/solr/collection_name/update?commit=true
在以前的版本中,可以有一个默认集合(示例中通常是 collection1),并且缩短的版本是有效的:
http://localhost:8983/solr/update?commit=true
不过,可以像这样命名集合第一个案例。
Since Solr 5 it is required to add collection name into the url, so now the right answer is:
http://localhost:8983/solr/collection_name/update?commit=true
In the previous versions it was possible to have a default collection (it was usually collection1, from the examples) and the shortened version was valid:
http://localhost:8983/solr/update?commit=true
Still, it was possible to name the collection like in the first case.
我想说“正确”答案中缺少一些东西 - URL 应包含集合名称,例如: http //localhost:8983/solr/mycollection/update?commit=true
I would say there is something missing in "right" answer - URL should contain collection name like: http://localhost:8983/solr/mycollection/update?commit=true
我知道这是一个旧线程,但只是说还有一种方法可以通过管理界面来执行此操作。
只需点击:
->左侧菜单上的数据导入
->然后勾选提交复选框
->然后执行
您将看到类似以下的消息:
“索引已完成。添加/更新:1 个文档。删除 0 个文档。(持续时间:01 秒)”
I know this is an old thread, but just to say that there is also a way to do this via the admin interface.
Simply click:
-> dataimport on the left menu
-> then tick the commit checkbox
-> then execute
You will see a message like:
"Indexing completed. Added/Updated: 1 documents. Deleted 0 documents. (Duration: 01s)"