实时分布式搜索引擎比较(senseidb、Solr、elasticsearch)

2019-03-27 01:09|来源: 网路

  • 1 1. Solr
    • 1.1 Features
    • 1.2 Pros & Cons
    • 1.3 References
  • 2 2. Senseidb
    • 2.1 Features
    • 2.2 Pros & Cons
    • 2.3 为何没有直接用Solr?
    • 2.4 References
  • 3 3. elasticsearch
    • 3.1 Features
    • 3.2 Pros & Cons
    • 3.3 References
  • 4 4. Conclusion
  • 5 其它参考文献

比较的时候,主要关注以下几个方面:

  1. Clustering
    • Scalability on Storage and Service
    • High Availability Considerations
  2. Features
  3. Flexibility

1. Solr

很显然, Solr跟Lucene是一家,所以,对Lucene做了很多扩展,与lucene的集成也比较好,而且,业界貌似求稳的都会选择Solr来构建他们的搜索体系。

但SolrCloud才是最终的理想解决方案,而SolrCloud还没有production-ready。

下面是Solr相关的架构图:

 image solr architecture

1.1 Features

Solr的首页上对自己的特性罗列阐述的很详细了,这里不再赘述。

1.2 Pros & Cons

  • Pros
    • 成熟且验证过的方案
    • 文档资料丰富
    • 社区活跃
    • plugin extension points
  • Cons
    • 貌似体系比较庞杂, replication的架构扩展有稍许问题?!

1.3 References

  1. New SolrCloud Design
  2. Scaling Lucene and Solr
  3. Turbocharging Solr Index Replication with BitTorrent
    • funny and sparkling idea by introducing BitTorrent replication mechanism *****
  4. Distributed Searching
  5. Carrot2-OSS framework for building search clustering engine
    • Solr search results clustering is based on the Carrot2 real-time document clustering engine.
  6. Clustering Component
    • 结果集的分类
  7. New SolrCloud Design
  8. SolrCloud
  9. UniqueKey
  10. Solr Near Realtime Search
    • will be added in Solr4, currently available in trunk
  11. Scaling Solr Indexing with SolrCloud, Hadoop and Behemoth

2. Senseidb

architecture of sensei

architecture of sensei

2.1 Features

  1. 主要解决高速索引更新的问题;
    • 底层是zoie的“2-swapping-in-memory-index + 1-on-disk-index”索引结构支持
  2. 需要定义schema;
  3. 通过Gateway可以接入多种数据源;
  4. 通过BQL或者REST API,甚至各种语言bindings进行数据查询;
  5. 支持通过hadoop MR job批量更新数据索引;

2.2 Pros & Cons

  • Pros
    • 高速索引更新
    • 多数据源接入
    • 灵活的访问接口
    • 与hadoop生态的集成
    • 优秀的分布式扩展能力
  • Cons
    • static schema
    • application side versioning maitaining

2.3 为何没有直接用Solr?

摘录在John Wang的访谈片段:

Sensei leverages Lucene.

We weren’t able to leverage Solr because of the following requirements:

    * High update requirement, 10’s of thousands updates per second in to the system
    * Real distributed solution, current Solr’s distributed story has a SPOF at the master, and Solr Cloud is not yet completed.
    * Complex faceting support. Not just your standard terms based faceting. We needed to facet on social graph, dynamic time ranges and many other interesting faceting scenarios. Faceting behavior also needs to be highly customizable, which is not available via Solr.

2.4 References

  1. Introducing SenseiDB 1.0: an open-source, distributed, realtime, semi-structured database
  2. Sensei: distributed, realtime, semi-structured database

3. elasticsearch

很新,当前0.19RC3版本, 文档缺乏。不过, ES确实有很多值得喝彩的地方。

image

3.1 Features

  1. Schema-Free | Schemaless
  2. feed index engine with JSON formatted documents
  3. Query by Lucene based query string or JSON based query DSL over HTTP or Native Java;
  4. shards and replicas, LB and routings
  5. cloud integration
  6. multiple search types
  7. multiple data sources integration with River
  8. many more...

3.2 Pros & Cons

  • Pros
    • 许多灵活, 优秀的特性(见features列表)
    • 作者拥有多年在搜索领域的涉猎经验
    • senseidb的pros它也基本都有
  • Cons
    • 文档不足
    • 后端没有大的商业机构支持

3.3 References

  1. quick intro to elastic search
  2. Flume, Hive and realtime indexing via ElasticSearch
  3. The Future of Compass & ElasticSearch
  4. Elastic Search: Distributed, Lucene-based Search Engine
  5. ElasticSearch at berlinbuzzwords 2010
  6. Elastic Search Vs. Apache Solr
    • 这篇貌似倾向于ES比较多一些
  7. Your Data, Your Search
  8. Search Engine Time Machine
    • transient状态与持久化状态的结合, write behind策略
  9. NoSQL, Yes Search
    • 多种数据源类型的平滑接入
  10. Geo Location and Search
    • 基于geo进行排序的特性很新颖
  11. Zero Conf Persistency
    • Local Gateway (Local Storage | Local FileSystem)
  12. The River
    • ES里River的概念跟Senseidb里Gateway的概念相近, 是数据源通道的意思,可以根据不同的数据源给出不同的River实现,比如基于MysqlBinlog的River, 基于Hbase的River,或者RabbitMQ RiverCouchDB River etc.
  13. Percolator
    • 这个Percolator是ES里的概念,不要跟Google的Percolator混淆
  14. Versioning
    • Optimistic Concurrency Control
  15. New Search Types
    • Introduce count and scan search types, the latter can be used to scroll large result set
  16. Data Visualization with ElasticSearch and Protovis
  17. Distributed Diagram (Video)
  18. Road to a Distributed Search Engine (Video)*****

4. Conclusion

  1. All are based on Lucene.
  2. All are distributed.
    • senseidb shards with multi-write?!
    • solr shards with master-slaves and slave pull strategy;
    • elasticsearch shards with primary-secondary push strategy;
  3. All do partitioning in document granularity, All require some unique key for each document(optional for some situations);
  4. Sensei is good at real-time index update; Solr is good at stable and wide adoption; Elasticsearch is good at flexible and good ideas;

5 其它参考文献

  1. Lily架构简介
    • 在自己的lily node里实现了multiwrite + wal+ message queue的数据分发, 没有充分利用现有系统中各个组件/系统的能力(虽然是基于hbase的table实现的), 部分上来讲把事情搞复杂了。

引自:http://afoo.me/notes-on-senseidb-solr-and-elasticsearch.html


转自:http://www.cnblogs.com/ibook360/archive/2013/03/22/2975345

相关问答

更多
  • 1.可以用lucene,lucene现在已经发展到1.9.1版了,相当稳定,网上中英文资源很丰富,甚至关于这个工具包的书(lucene in action)都有了.如果只是做站内搜索,可以直接从读数据库中读数据,调用lucene做索引.再写一个前台查询界面,调用lucene查询索引并在前台显示结果. 想一点程序都不写的话可以参考下面2个方案 2.用heritrix + nutchwax,heritrix也是一个很成熟的crawler,他将网页下载并压缩保存到arc格式的文件中,一个arc文件一般100兆左右 ...
  • 1. Elasticsearch是一个实时的分布式搜索和分析引擎。它可以帮助你用前所未有的速度去处理大规模数据。 2. 它可以用于全文搜索,结构化搜索以及分析,当然你也可以将这三者进行组合。 3. Elasticsearch是一个建立在全文搜索引擎 Apache Lucene™ 基础上的搜索引擎,可以说Lucene是当今最先进,最高效的全功能开源搜索引擎框架。
  • 从0讲解爬虫基本原理,对爬虫中所需要用到的知识点进行梳理,从搭建开发环境、设计数据库开始,通过爬取三个知名网站的真实数据,带你由浅入深的掌握Scrapy原理、各模块使用、组件开发,Scrapy的进阶开发以及反爬虫的策略 彻底掌握Scrapy之后,带你基于Scrapy、Redis、elasticsearch和django打造一个完整的搜索引擎网站!
  • 1.可以用lucene,lucene现在已经发展到1.9.1版了,相当稳定,网上中英文资源很丰富,甚至关于这个工具包的书(lucene in action)都有了.如果只是做站内搜索,可以直接从读数据库中读数据,调用lucene做索引.再写一个前台查询界面,调用lucene查询索引并在前台显示结果. 想一点程序都不写的话可以参考下面2个方案 2.用heritrix + nutchwax,heritrix也是一个很成熟的crawler,他将网页下载并压缩保存到arc格式的文件中,一个arc文件一般100兆左右 ...
  • 1. 从0讲解爬虫基本原理,对爬虫中所需要用到的知识点进行梳理,从搭建开发环境、设计数据库开始,通过爬取三个知名网站的真实数据,带你由浅入深的掌握Scrapy原理、各模块使用、组件开发,Scrapy的进阶开发以及反爬虫的策略 2. 彻底掌握Scrapy之后,带你基于Scrapy、Redis、elasticsearch和django打造一个完整的搜索引擎网站!
  • 全文搜索 MATCH() 函数 全文索引在 MySQL 中是一个 FULLTEXT 类型索引。FULLTEXT 索引用于 MyISAM 表,可以在 CREATE TABLE 时或之后使用 ALTER TABLE 或 CREATE INDEX 在 CHAR、VARCHAR 或 TEXT 列上创建。对于大的数据库,将数据装载到一个没有 FULLTEXT 索引的表中,然后再使用 ALTER TABLE (或 CREATE INDEX) 创建索引,这将是非常快的。将数据装载到一个已经有 FULLTEXT 索引的表中 ...
  • apache下的solr 和nurth 等都可以考虑
  • 我解决了使用https://github.com/aparo/pyes库。 示例输入: >>> conn.index({"name":"Joe Tester", "parsedtext":"Joe Testere nice guy", "uuid":"11111", "position":1}, "test-index", "test-type", 1) 如http://pyes.readthedocs.org/en/latest/manual/queries.html所示 I solved using ...
  • 您可以避免这种情况的一种方法是仅使用可靠的节点来存储和检索值。 节点的可靠性必须由已知良好的节点计算,并且它可能类似于节点的最后几个计算的排序因子与由已知良好节点计算的相同排序因子的相似性(即比较节点的分数)对于google.com来说,google.com的已知好成绩)。 使用这种方法,您需要避免“流氓可靠节点”问题(例如,通过随机检查或随机降低所有可靠性分数)。 您可以采用的另一种方法是跨多个节点复制排名因子的计算,在搜索时获取所有值,并在客户端对它们进行排名(例如,使用方差)。 您还可以将搜索限制为仅 ...
  • 有三条鲸鱼: MapReduce , 谷歌文件系统 , BigTable There're three whales: MapReduce, Google File System, BigTable