ruby-on-rails - Solr 部分文档索引更新

标签 ruby-on-rails ruby lucene solr sunspot

我正在使用 Solr 和 Solr:Cell 插件来索引和搜索富文本文档和元数据。

定义:solr_document = tuple(rich_text_document, metadata1, metadata2)

我想在元数据发生变化时重新索引一些 solr_documents,但只有 solr_document 中发生变化的部分,而不是整个 solr_documnt,因为从富文本文档中解析和提取文本的计算成本高昂且毫无意义,因为富文本文档未被修改.

Solr 是否支持部分文档索引更新?

附加的:
我通过 sunspot 使用 Solr在 Rails 应用程序中。 一位主要的太阳黑子开发商说 here那:

Solr does not support the concept of partial updates -- under the hood, updating a document actually consists of removing it from the index and then re-adding it. So, Sunspot does have to construct the full document each time anything changes; it's an unfortunate limitation from a performance standpoint, but it's pretty fundamental to the way Solr and Lucene work.

有什么可以做的吗,也许 Solr:Cell 允许做些什么?

最佳答案

Does Solr support partial document index updates?

没有。查看FAQ .

Is there anything that can be done?

是的,IIRC 在 JIRA 项目中有一个关于它的问题。查找它,询问缺少什么,为实现它做出贡献。

关于ruby-on-rails - Solr 部分文档索引更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5220473/

相关文章:

ruby-on-rails - Ruby/Rails - 更改时间的时区,而不更改值

elasticsearch - 如何从 elasticsearch 结果中排除大量 id?

elasticsearch - Kibana发现:搜索特殊字符: '@'

ruby-on-rails - 更新旧记录而不是创建新记录?

javascript - 按 DESC 排序输入会破坏 jQuery UI 自动完成功能

ruby-on-rails - Rails/Active 支持 "to_sentence"已弃用

javascript - 如何在 ruby​​ on Rails 中的 haml 内的 js 设置 session 变量?

ruby - 如何比较两个哈希值?

ruby-on-rails - 名称错误 : undefined local variable or method `logger'

java - Lucene 禁止了不应该出现的子句 "fuzzyfied"