文档章节

solr与ES 比较 Realtime Search: Solr vs Elasticsearch

kiwisoft
 kiwisoft
发布于 2015/11/23 11:36
字数 473
阅读 1091
收藏 0

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

What is Elasticsearch?

Elasticsearch is REST based, distributed search engine powered by the excellent Lucene library. The built in JSON + HTTP API provides an elegant platform perfect for integrating with (ex: the elastic_searchable ruby gem). It’s simple, scalable and “cool, bonsai cool“.


Why is it better than Solr?

First of all, let’s set the record straight: Solr is fast. I’m serious…it’s really fast! Solr is the defacto search engine for a reason. It’s stable, reliable and out of the box, it outperforms nearly every search solution for basic vanilla searches (including Elasticsearch).

Unfortunately, it is really easy to break Solr as well. All it takes is to performing searches while concurrently updating the index with new content. This is a pretty serious problem if you need to update your search index regularly.

Now throw a few million documents into the index and Solr will be buckling at the knees while Elasticsearch doesn’t break a sweat!

It is painfully apparent that Solr’s architecture was not built for realtime search applications. The demands of realtime web applications require delivery of updates in near realtime as new content is generated by users. The distributed nature of Elasticsearch allows it to keep up with concurrent search + index requests without skipping a beat.

Realworld Results…

After transitioning our search infrastructure from Solr to Elasticsearch, we saw an instant ~50x improvement in search performance!

And now for something a bit more interesting…

The typical realtime search architecture goes something like this:

  1. index user content into the search engine

  2. perform set of queries against search engine to determine if content matches particular criteria

  3. perform specific logic notifying registered channels that new content is available

Elasticsearch can support this model quite well, but it also offers a feature that turns this entire workflow on it’s head.

Introducing: Percolation!

Elasticsearch percolation is similar to webhooks. The idea is to have Elasticsearch notify your application when new content matches your filters instead of having to constantly poll the search engine to check for new updates.

The new workflow looks like this:

  1. register specific query (percolation) in Elasticsearch

  2. index new content (passing a flag to trigger percolation)

  3. the response to the indexing operation will contain the matched percolations

This is the perfect architecture for realtime search and a true gamechanger.

The Bottom Line

Solr may be the weapon of choice when building standard search applications, but Elasticsearch takes it to the next level with an architecture for creating modern realtime search applications. Percolation is an exciting and innovative feature that singlehandedly blows Solr right out of the water. Elasticsearch is scalable, speedy and a dream to integrate with. Adios Solr, it was nice knowing you.

本文转载自:http://blog.socialcast.com/realtime-search-solr-vs-elasticsearch/

kiwisoft

kiwisoft

粉丝 14
博文 42
码字总数 21384
作品 2
朝阳
部门经理
私信 提问
ElasticSearch VS. Solr VS. Sphinx:最好的开源搜索引擎比较

译者按:本文是来自一家乌克兰技术公司的文章。该文章译者认为着重在应用上,而非单纯的性能对比。给自己的平台选择一个合适的搜索引擎比任何一个吹嘘技术强大的好。虽然最近一两年 ES发展飞...

李朝强
06/17
86
0
全文搜索引擎选ElasticSearch还是Solr?

而且它还是其他团队在维护,依赖性太强,导致 Solr 服务一出问题,我们的项目也基本瘫痪,因为所有的依赖查询都无结果数据了。 所以考虑开发一个适配层,如果 Solr 搜索出问题,自动切换到新...

51CTO技术栈
2018/12/27
0
0
全文搜索引擎选 ElasticSearch 还是 Solr?

点击上方“芋道源码”,选择“设为星标” 做积极的人,而不是积极废人! 来源:http://t.cn/Ebgm7sn 什么是全文搜索 为什么要用全文搜索搜索引擎 Lucene,Solr,ElasticSearch ? Elasticsea...

芋道源码
04/03
0
0
Java搜索引擎选择: Elasticsearch与Solr(转)

Elasticsearch简介 Elasticsearch是一个实时的分布式搜索和分析引擎。它可以帮助你用前所未有的速度去处理大规模数据。 它可以用于全文搜索,结构化搜索以及分析,当然你也可以将这三者进行组...

easonjim
2017/11/13
0
0
搜索引擎选择: Elasticsearch与Solr

搜索引擎选型调研文档 Elasticsearch简介* Elasticsearch是一个实时的分布式搜索和分析引擎。它可以帮助你用前所未有的速度去处理大规模数据。 它可以用于全文搜索,结构化搜索以及分析,当然...

开源中国首席码农
2016/11/15
1K
4

没有更多内容

加载失败,请刷新页面

加载更多

如何更改iOS应用程序的名称?

我前几天用一个愚蠢的开发代码名称开始了一个iPhone项目,现在我想改变项目的名称,因为它已经接近完成了。 但是我不知道如何使用Xcode来做这件事,尝试在info.plist文件中更改应用程序的名称...

技术盛宴
26分钟前
3
0
关于win10tensorflow的配置(CPU+GPU)

主要内容 CPU篇 GPU篇 【前期准备与注意事项】 环境:window1064位+python36(37)+CUDA9.0+cuDNN7.6+tensorflow_gpu-1.12.0 软件:anaconda+pycharm 硬件:有nvidia显卡的笔记本或台式(非A...

放只虎归个山
35分钟前
3
0
C#中的多行字符串文字

有没有一种简单的方法可以在C#中创建多行字符串文字? 这是我现在所拥有的: string query = "SELECT foo, bar"+ " FROM table"+ " WHERE id = 42"; 我知道PHP有 <<<BLOCKBLOCK; C#是......

javail
42分钟前
4
0
微信支付之小微商户扫盲!支持信用卡,免营业执照!

微信支付商户申请面向线下小微商户开放,符合条件的微信支付服务商可为小微商户发起接入申请。无需营业执照。 小微商户日收款额度为5万元~30万元 。 信用卡支付日限额为1千;月限额1万。 结算...

吴伟祥
今天
4
0
大话SDWebImage(三)-- 图片下载层

四、图片下载层 SDWebImageDownloader是处理图片下载的类 4.1 图片下载步骤 首先介绍下dispatch_barrier,GCD中的dispatch_barrier目的是在并发队列实现串行的效果,创建下载任务SDWebImageD...

aron1992
今天
4
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部