合并多个分类索引以进行分面搜索
我计划更改现有的 lucene 索引以使用 lucene 3.4.0 中引入的新方面。
不幸的是,文档仍然有点稀疏,所以我找不到问题的答案:
我创建了一个包含 800 万本书的相对较大的索引,方法是将其分为几个较小的文档组,为它们创建索引,然后将它们全部连接起来使用 IndexWriter.addIndexes 合并到一个大索引。
这允许将工作分配给多个线程甚至计算机。
我现在想向索引添加分面搜索功能,但遇到以下问题:如何合并/添加/加入由 LuceneTaxonmyWriter 创建的多个分类索引?
I am planing to change my existing lucene index to use the new facets introduced in lucene 3.4.0.
Unfortunately, documentation is still a bit sparse, so I could not find an answer to my question:
I create a relatively large index of 8 million books by dividing it into several smaller groups of documents, creating indices for them, and then joining them all together to one big index using IndexWriter.addIndexes
.
This allows the work to be split among several threads or even computers.
I now would like to add faceted search capabilities to my index, but I have the following problem: How can I merge/add/join several taxonomy indexes as created by LuceneTaxonmyWriter?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我问了同样的问题 关于 lucene 邮件列表 他们将我指向类 TaxonomyMergeUtils 即lucene-facets 模块示例的一部分。
此类包含将两个索引及其分类索引合并在一起所需的代码。
注意:如果您使用 maven 包,则不包含示例,您必须从网站下载完整的 lucene 包(可能还有它的源代码)。
I asked the same question on the lucene mailing list and they pointed me to the class TaxonomyMergeUtils that is part of the examples for the lucene-facets module.
This class contains the code needed to merge two indexes together with their taxonomy index.
Note: If you are using the maven package, the examples are not included, you will have to download the complete lucene package (and probably its source code as well) from the website.