Apache Solr 4 最实用的自动建议组件
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该能够结合使用 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.
我写了一篇博客文章 关于使用 Solr 提出自动完成建议。看看吧,也许有用! 的方法以及相关的优缺点:
的解决方案可供使用,但本文可以帮助您根据您的要求做出正确的选择。
由于您想要显示复杂的结果而不仅仅是单词,因此您应该考虑使用 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:
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.