简体   繁体   English

我们可以定制嵌入在Solr中的Lucene吗?

[英]Can we customize Lucene which is embedded in Solr?

Can we customize Lucene which is embedded in Solr just as we can in raw Lucene ? 我们可以在原始Lucene中定制嵌入Solr的Lucene吗? So that we can have "everything" that we have in Lucene in Solr ? 这样我们就可以在Solr的Lucene拥有“一切”了吗?

I am asking this because we are stuck at a point of deciding Solr vs Lucene, thinking like so : 我问这个是因为我们陷入了决定Solr vs Lucene的地步,这样想:

Argument 1 : 论点1:

"We might hit a dead zone in future if we choose Solr, and Lucene is a better choice hence... So we might as well start writing HTTP wrappers and almost half of Solr ourselves on top of Lucene to be on safer side. " “如果我们选择Solr,我们将来可能会遇到死区,因此Lucene是一个更好的选择......所以我们不妨开始编写HTTP封装器,而且几乎有一半的Solr自己在Lucene之上处于更安全的一面。”

Argument 2 : 论点2:

"Solr already has all the features we want to use, so why not just use it ? Since people who commit to Lucene are also responsible for committing to Solr, all features of Lucene are available to Solr too..." “Solr已经具备了我们想要使用的所有功能,所以为什么不直接使用呢?由于承诺Lucene的人也负责承诺Solr,所以Lucene的所有功能也可供Solr使用......”

I went through many blogs and posts that say something like : 我浏览了很多博客和帖子,上面写着:

For situations where you have very customized requirements requiring low-level access to the Lucene API classes, Solr would be more a hindrance than a help, since it is an extra layer of indirection. 对于需要对Lucene API类进行低级访问的非常自定义的需求的情况,Solr将是一个障碍而不是帮助,因为它是一个额外的间接层。
-http://www.lucenetutorial.com/lucene-vs-solr.html -http://www.lucenetutorial.com/lucene-vs-solr.html

One way of defending Argument 2 is by confirming that we can customize the underlying Lucene in Solr just like we would do if we had only Lucene. 防御论证2的一种方法是确认我们可以在Solr中定制底层的Lucene,就像我们只有Lucene一样。

Can someone provide a better way of closing this argument ? 有人可以提供更好的方法来结束这个论点吗? :) :)

ps : We need a fast search with indexing and sharding terabytes of data... ps:我们需要快速搜索索引和分片数TB的数据......

Can we customize Lucene which is embedded in Solr ? 我们可以定制嵌入在Solr中的Lucene吗?

Yes, you can . 是的,你可以 But keep this in mind: 但要记住这一点:

Lucene and Solr committers are some of the foremost experts in the field of full-text search. Lucene和Solr提交者是全文搜索领域的一些最重要的专家。 They have several years of experience in this field. 他们在这个领域有多年的经验。 If you think you can do better than them, then go ahead and change Solr to your needs (it's Apache-licensed so there aren't any commercial restrictions), and if you do so try to do it so that you can later contribute it back to the project so everyone can benefit and the project moves forward. 如果你认为你可以比他们做得更好,那么继续改变Solr以满足你的需求(它是Apache授权的,所以没有任何商业限制),如果你这样做,试着这样做,以便你以后可以贡献它回到项目,这样每个人都可以受益,项目也会向前发展。

For the vast majority of Solr users though, the stock product is more than enough and satisfies all needs. 对于绝大多数Solr用户而言,库存产品绰绰有余并满足所有需求。

In other words, before jumping in to change the code, ask on a mailing list (stackoverflow or solr-user), there's a good chance that you don't really need to change any code. 换句话说,在跳转到更改代码之前,请在邮件列表(stackoverflow或solr-user)上询问,您很可能不需要更改任何代码。

"Fast search with indexing and sharding terabytes of data" is precisely what Solr was built for. “使用索引和分片数据进行快速搜索”正是索尔所构建的。 It would be a bad case of Not-Invented-Here not to use it or any of the other similar solutions, such as ElasticSearch, Sphinx, Xapian, etc. If you think you'll need to customize or extend the search server in any way, consider the license and underlying code of each one. 这是一个不发明的坏情况 - 这里不使用它或任何其他类似的解决方案,如ElasticSearch,Sphinx,Xapian等。如果您认为您需要自定义或扩展任何搜索服务器考虑每个的许可证和底层代码。 Solr and ElasticSearch are both Apache-licensed so they don't have commercial restrictions and are built on top of Lucene, a well-known library. Solr和ElasticSearch都是Apache许可的,因此它们没有商业限制,并且建立在着名的Lucene库之上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM