cassandra的全文检索插件

简介:

https://github.com/Stratio/cassandra-lucene-index

Stratio’s Cassandra Lucene Index

Stratio’s Cassandra Lucene Index, derived from Stratio Cassandra, is a plugin for Apache Cassandra that extends its index functionality to provide near real time search such as ElasticSearch or Solr, including full text search capabilities and free multivariable, geospatial and bitemporal search. It is achieved through an Apache Lucene based implementation of Cassandra secondary indexes, where each node of the cluster indexes its own data. Stratio’s Cassandra indexes are one of the core modules on which Stratio’s BigData platform is based.

architecture

Index relevance searches allow you to retrieve the n more relevant results satisfying a search. The coordinator node sends the search to each node in the cluster, each node returns its n best results and then the coordinator combines these partial results and gives you the n best of them, avoiding full scan. You can also base the sorting in a combination of fields.

Any cell in the tables can be indexed, including those in the primary key as well as collections. Wide rows are also supported. You can scan token/key ranges, apply additional CQL3 clauses and page on the filtered results.

Index filtered searches are a powerful help when analyzing the data stored in Cassandra with MapReduce frameworks as Apache Hadoop or, even better, Apache Spark. Adding Lucene filters in the jobs input can dramatically reduce the amount of data to be processed, avoiding full scan.

spark_architecture

The following benchmark result can give you an idea about the expected performance when combining Lucene indexes with Spark. We do successive queries requesting from the 1% to 100% of the stored data. We can see a high performance for the index for the queries requesting strongly filtered data. However, the performance decays in less restrictive queries. As the number of records returned by the query increases, we reach a point where the index becomes slower than the full scan. So, the decision to use indexes in your Spark jobs depends on the query selectivity. The trade-off between both approaches depends on the particular use case. Generally, combining Lucene indexes with Spark is recommended for jobs retrieving no more than the 25% of the stored data.

spark_performance

This project is not intended to replace Apache Cassandra denormalized tables, inverted indexes, and/or secondary indexes. It is just a tool to perform some kind of queries which are really hard to be addressed using Apache Cassandra out of the box features, filling the gap between real-time and analytics.

oltp_olap

More detailed information is available at Stratio’s Cassandra Lucene Index documentation.

Features

Lucene search technology integration into Cassandra provides:

Stratio’s Cassandra Lucene Index and its integration with Lucene search technology provides:

  • Full text search (language-aware analysis, wildcard, fuzzy, regexp)
  • Boolean search (and, or, not)
  • Sorting by relevance, column value, and distance
  • Geospatial indexing (points, lines, polygons and their multiparts)
  • Geospatial transformations (bounding box, buffer, centroid, convex hull, union, difference, intersection)
  • Geospatial operations (intersects, contains, is within)
  • Bitemporal search (valid and transaction time durations)
  • CQL complex types (list, set, map, tuple and UDT)
  • CQL user defined functions (UDF)
  • CQL paging, even with sorted searches
  • Columns with TTL
  • Third-party CQL-based drivers compatibility
  • Spark and Hadoop compatibility

Not yet supported:

  • Thrift API
  • Legacy compact storage option
  • Indexing counter columns
  • Indexing static columns
  • Other partitioners than Murmur3

Requirements

  • Cassandra (identified by the three first numbers of the plugin version)
  • Java >= 1.8 (OpenJDK and Sun have been tested)
  • Maven >= 3.0















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6757830.html,如需转载请自行联系原作者
相关文章
|
4月前
|
分布式计算 API Apache
Spark与Elasticsearch的集成与全文搜索
Spark与Elasticsearch的集成与全文搜索
|
6月前
|
自然语言处理 搜索推荐 索引
分布式系列教程(31) -ElasticSearch倒排索引
分布式系列教程(31) -ElasticSearch倒排索引
60 0
|
11月前
|
存储 SQL 搜索推荐
【ElasticSearch从入门到放弃系列 一】全文检索基本概念
【ElasticSearch从入门到放弃系列 一】全文检索基本概念
119 0
|
12月前
|
关系型数据库 测试技术 数据库
【全文搜索】全文搜索 PostgreSQL 或 ElasticSearch
【全文搜索】全文搜索 PostgreSQL 或 ElasticSearch
|
存储 SQL 自然语言处理
sphinx全文检索引擎
sphinx全文检索引擎
109 0
|
存储 JSON 搜索推荐
Elasticsearch全文检索系统实现深入详解
题记 学习ES的童鞋,都有一个开发一个类似百度的搜索引擎的想法。当然功能不一定是百度、360、谷歌传统的搜索引擎那么强大。 但是,能实现基本的全文检索、指定类型的检索、评分高低优先级排序等等。 那么问题来了,该如何实现?需要什么技术呢?
266 0
Elasticsearch全文检索系统实现深入详解
|
存储 数据可视化 Oracle
Elasticsearch实战——全文检索架构设计
1、题记 近几年,Elasticsearch(以下简称ES)作为开源的搜索引擎已经在国内得到越来越多的应用推广,在日志分析领域应用场景尤为广泛。传统的数据库Mysql、Oracle或者非关系型数据库Mongo作为基础存储的企业要想实现业务数据的全文检索,该如何实现呢? 本文给出架构设计和实现原理。
288 0
Elasticsearch实战——全文检索架构设计
|
XML 存储 自然语言处理
全文检索技术-solr
文字涉及Solr的安装及配置、使用Solr的后台管理索引库、使用SolrJ管理索引库、电商案例实现等
628 0
全文检索技术-solr
|
存储 自然语言处理 Java
分布式--Lucene 全文检索
1. Lucene 官网 1). 概述 Lucene是一款高性能的、可扩展的信息检索(IR)工具库。信息检索是指文档搜索、文档内信息搜索或者文档相关的元数据搜索等操作。
1135 0