.NET 站点上的 Solr
我有一个由 SQL Server 数据库支持的 ASP.NET 站点。我一直在使用 Lucene.NET 来索引和搜索数据库。我将分面搜索导航添加到结果页面(分面是分层类别树)。我昨天要求确保我使用正确的刻面技术。到目前为止,我得到的只是使用 Solr 的建议,但 Solr 做了很多我不需要的事情。
我真的很想从熟悉 Solr 源代码的人那里知道 Solr 的分面处理是否与 Bert Willems 在此描述了。基本上,每个方面都有一个 Lucene 过滤器,从中获取位数组,并对数组中设置的位进行计数。
我在想,既然我的设计一开始就是分层的,我应该能够很好地优化它,但我担心我可能严重低估了这种设计对搜索性能的影响。如果 Solr 不更快,我就不会通过使用它获得任何好处。
I've got an ASP.NET site backed with a SQL Server database. I'm been using Lucene.NET to index and search the database. I'm adding faceted search navigation to the results page (the facets are a hiarchical category tree). I asked yesterday to make sure I was using the right technique for faceting. All I've gotten so far is a suggestion to use Solr, but Solr does a lot of things I don't need.
I would really like to know from anyone who is familiar with the Solr's source code if Solr's facet processing is terribly different from the one described here by Bert Willems. Bascially you have a Lucene filter for each facet, you get the bits array from it, and you count the set bits in the array.
I'm thinking since mine is hiarchical to begin with I should be able to optimize this pretty well, but I'm afraid I might be grossly under-estimating the impact of this design on search performance. If Solr is no quicker, I'm not going to gain anything by using it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用 Solr 创建一个原型项目来模拟您的分面需求,并将其与 Lucene.net 进行基准测试。
即使 分面Solr 非常优化(并且一直在获得新的优化,例如 并行每段分面方法),使用 Solr 时会产生一些开销,例如网络往返和响应解析。
如果您的代码已经实现了 Lucene.NET,并且性能良好并且您不需要 Solr 的任何附加功能,则无需切换到 Solr。但还要考虑到,如果您选择 Solr,您将在每个新版本中免费获得分面性能提升。
I'd recommend creating a prototype project modeling your faceting needs with Solr and benchmark it against Lucene.net.
Even though faceting in Solr is very optimized (and gets new optimizations all the time, like the parallel per-segment faceting method), when using Solr there is some overhead, for example network roundtrips and response parsing.
If your code already implements Lucene.NET, performs adequately and you don't need any of Solr's additional features, then there is no need to switch to Solr. But also consider that if you choose Solr you will get faceting performance boosts for free with each new version.