Apache Solr 4 最实用的自动建议组件

发布于 2024-12-07 00:26:52 字数 642 浏览 1 评论 0原文

Solr 组件中哪一个最好:

TermsComponent

现在对我们来说效果很好,但有局限性,即:
- 我们无法在同一响应中打印出关联文档的图像

SpellCheckComponent

具有相同的限制

将与带有 NGrams 的TermsComponent SearchComponent

这似乎是朝着正确方向迈出的一步,但也遇到了一些限制:
我们希望能够显示按文档类型分组的所有文档,并以以下格式建议结果:


平台
[IMG] XBOX (12)
[IMG] PS2 (9)


类别
动作 - 格斗 (20)
动作 - 军事 (13)


出版商
[IMG] 索尼 (20)
[IMG] 微软 (13)


游戏
[IMG] 光环 2
[IMG] Halo 3

建议真实产品名称 + 图片 + ID + 按权重排序的匹配数。

哪个更有可能产生最佳结果并最小化负载?我们有不到 25K 份文档

Which one of the Solr components is the best:

TermsComponent

works well for us now but with limitations, ie:
- we can't print out the image for associated document in the same response

SpellCheckComponent

will have same limitations as TermsComponent

SearchComponent with NGrams

This one seems to be the step in the right direction but ran into a few limitations as well:
we'd like to be able to show all document grouped by doc type and suggest results in the following format:


Platforms
[IMG] XBOX (12)
[IMG] PS2 (9)


Category
Action - Fighting (20)
Action - Military (13)


Publisher
[IMG] Sony (20)
[IMG] Microsoft (13)


Games
[IMG] Halo 2
[IMG] Halo 3

suggest Real Product Name + Image + ID + Number of matches sorted by the weight.

Which is more likely to produce best results and minimize the load? We've got just under 25K documents

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

忆离笙 2024-12-14 00:26:52

您应该能够结合使用 ngram 和分面来做到这一点。您可以搜索 ngram 以获取所需的文档,然后使用构面查询正确输出结果。

You should be able to do this with a combination of ngrams, and faceting. You would search against the ngrams to get the documents you want, then use the facet queries to output your results properly.

第七度阳光i 2024-12-14 00:26:52

我写了一篇博客文章 关于使用 Solr 提出自动完成建议。看看吧,也许有用! 的方法以及相关的优缺点:

  • Facet using facet.prefix parameter
  • NgramsTermsComponentSuggester
  • 我写了以下不同
  • 不幸的是,还没有一个完整

的解决方案可供使用,但本文可以帮助您根据您的要求做出正确的选择。
由于您想要显示复杂的结果而不仅仅是单词,因此您应该考虑使用 NGrams。它实际上是最灵活的解决方案,您可以将其与分面结合起来,正如您得到的其他答案中已经提到的那样。

I wrote a blog post about making auto complete suggestions with Solr. Check it out, it might be useful! I wrote about the following different ways and the related pros and cons:

  • Facet using facet.prefix parameter
  • Ngrams
  • TermsComponent
  • Suggester

Unfortunately there isn't yet a complete solution ready to go, but the article can help you making the right choice depending on your requirements.
Since you want to show a complex result and not just words, you should consider using NGrams. It is actually the most flexible solution, and you can combine it with faceting as already mentioned in the other answer you got.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文