solr 和 lucene 的区别 [英] Difference between solr and lucene

查看:29
本文介绍了solr 和 lucene 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 Lucene 和 Solr 是两个不同的 Apache 项目,它们可以一起工作,但我不知道'不明白每个项目的目标是什么.

I know that Lucene and Solr are 2 differents Apache projects that are made to work together, but I don't understand what is the aim of each project.

到目前为止,我的理解是 Lucene 用于创建搜索索引,Solr 使用该索引执行搜索.我是对的还是这是完全不同的方法?

For what I understood until now is that Lucene is used to create a search index and Solr use this index to perform searches. Am I right or is this a totally different approach?

推荐答案

@darkheir:Lucene 和 Solr 是 2 个不同的 Apache 项目,它们可以一起工作,我不明白目的是什么每个项目.

  1. Solr 在后台使用 Lucene.Lucene 不知道 Solr API.

  1. Solr uses Lucene under the hood. Lucene has no clue about the Solr API.

Lucene 是一个强大的搜索引擎框架,它可以让我们将搜索功能添加到我们的应用程序中.它公开了一个易于使用的 API,同时隐藏了所有与搜索相关的复杂操作.任何应用程序都可以使用这个库,而不仅仅是 Solr.

Lucene is a powerful search engine framework that lets us add search capability to our application. It exposes an easy-to-use API while hiding all the search-related complex operations. Any application can use this library, not just Solr.

Solr 是围绕 Lucene 构建的.它不仅仅是一个围绕 Lucene 的 http-wrapper,而是 已知为 Lucene 添加更多工具(已存档).Solr 开箱即用.它是一个 Web 应用程序,除了 Lucene 提供的功能之外,还提供相关的基础架构和更多功能.

Solr is built around Lucene. It is not just an http-wrapper around Lucene but has been known to add more arsenal to Lucene (archived). Solr is ready-to-use out of box. It is a web application that offers related infrastructure and a lot more features in addition to what Lucene offers.

@darkheir:Lucene 用于创建搜索索引,Solr 使用该索引执行搜索.我是对的还是这是一种完全不同的方法?

  1. Lucene 不只是为 Solr 的消费创建索引.Lucene 处理所有与搜索相关的操作.任何应用程序都可以使用 Lucene 框架.

  1. Lucene doesn't just create the Index for the consumption by Solr. Lucene handles all the search related operations. Any application can use the Lucene framework.

例如 Solr、Elastic Search、LinkedIn(是的,在后台)等.

Examples are Solr, Elastic Search, LinkedIn (yes, under the hood), etc..

查看这篇文章:Lucene vs Solr

更新(2014 年 6 月 18 日)

何时使用 Lucene?

  • 您是一名搜索工程师并且
  • 你是一名程序员并且
  • 您希望完全控制 Lucene 的几乎所有内部​​结构,并且
  • 您的要求要求您对 Lucene 进行各种令人讨厌的自定义,并且
  • 您愿意处理搜索的基础架构元素,例如扩展、分发等.

何时使用 Solr?

  • 以上至少一项没有意义.或
  • 您想要开箱即用的东西(即使没有 Java 知识)或
  • 您的基础架构要求超过了搜索自定义要求.

注意:我并不是说 Solr 很难定制.Solr 非常灵活,提供了很多可插拔的 API 点,让您可以随意插入代码.

NOTE: I don't mean that Solr is hard to customize. Solr is very flexible and provides a lot of pluggable API points, allowing you to throw-in your code.

有些人属于'必须使用 Lucene' 阵营,但仍然喜欢 Solr 而不是普通的 Lucene,因为它易于使用.但是,他们从不克制自己最大限度地定制 Solr.

There are people, falling under 'have to use Lucene' camp, but still prefer Solr to plain Lucene as it's easy to use. However, they never restrain themselves from customizing Solr to the maximum extent.

顺便说一句,我发现 Solr (4.x) 上的资源比 Lucene (4.x) 上的资源多.

BTW, I see that there are more resources on Solr (4.x) than Lucene (4.x).

这篇关于solr 和 lucene 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆