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.
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.
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.
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.
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
cassandra的全文检索插件的更多相关文章
- 大约SQL/NoSQL数据库搜索/思考查询
转载请注明出处:jiq•钦's technical Blog Hbase特征: 近期在学习Hbase.Hbase基于行健是建立了索引的,查询速度会很快,全然实时. 可是Hbase要基于行健之外的字段进 ...
- Spring cloud gateway
==================================为什么需要API gateway?==================================企业后台微服务互联互通, 因为 ...
- Postgresql-模糊匹配大杀器
# Postgresql-模糊匹配大杀器 ## 问题背景 随着pg越来越强大,abase目前已经升级到5.0(postgresql10.4),目前abase5.0继承了全文检索插件(zhparser) ...
- mysql字段约束-索引-外键---3
本节所讲内容: 字段修饰符 清空表记录 索引 外键 视图 一:字段修饰符 (约束) 1:null和not null修饰符 我们通过这个例子来看看 mysql> create table wo ...
- MySql5.7InnoDB全文索引(针对中文搜索)
1.ngram and MeCab full-text parser plugins 全文检索在MySQL里面很早就支持了,只不过一直以来只支持英文.缘由是他从来都使用空格来作为分词的分隔符,而对于中 ...
- Mysql常见索引介绍
索引是一种特殊的文件,包含了对数据表中所有记录的引用指针.InnoDB引擎的数据库,其上的索引是表空间的一个组成部分. (1).索引的优缺点 优点:加快搜索速度,减少查询时间 缺点:索引是以文件的形式 ...
- search(9)- elastic4s logback-appender
前面写了个cassandra-appender,一个基于cassandra的logback插件.正是cassandra的分布式数据库属性才合适作为akka-cluster-sharding分布式应用的 ...
- 老司机带你玩转面试(1):缓存中间件 Redis 基础知识以及数据持久化
引言 今天周末,我在家坐着掐指一算,马上又要到一年一度的金九银十招聘季了,国内今年上半年受到 YQ 冲击,金三银四泡汤了,这就直接导致很多今年毕业的同学会和明年毕业的同学一起参加今年下半年的秋招,这个 ...
- mysql使用全文索引实现大字段的模糊查询
0.场景说明 centos7 mysql5.7 InnoDB引擎 0.1创建表 DROP TABLE IF EXISTS tbl_article_content; CREATE TABLE tbl_a ...
随机推荐
- Django中配置自定义日志系统
将
- LeetCode(30) Substring with Concatenation of All Words
题目 You are given a string, s, and a list of words, words, that are all of the same length. Find all ...
- 集训第四周(高效算法设计)P题 (构造题)
Description There are N<tex2html_verbatim_mark> marbles, which are labeled 1, 2,..., N<te ...
- vim学习之旅01-文本搜索并高亮显示
step 1:在linux终端新建一个test.txt文本文档:vim test.txt; 回车后打开编辑器: step 2:进入编辑状态(键盘"i")输入一段文本,退出编辑(键盘 ...
- java连接MySQL数据库并读取内容
package sqldemo; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSe ...
- poj 1986tarjan模板题
#include<iostream> #include<vector> using namespace std; const int N=40010; int pre[N];/ ...
- 算法(1):查找&排序
算法(Algorithm):一个计算过程,解决问题的方法 程序 = 数据结构+算法 时间复杂度: 当算法过程中出现循环折半的时候,复杂度式子中会出现 O(logn) 时间复杂度小结: 1. 时间复杂度 ...
- hdu - 1429 胜利大逃亡(续) (bfs状态压缩)
http://acm.hdu.edu.cn/showproblem.php?pid=1429 终于开始能够做状态压缩的题了,虽然这只是状态压缩里面一道很简单的题. 状态压缩就是用二进制的思想来表示状态 ...
- 用ReentrantLock和Condition实现生产者和消费者模式
前面一篇文章<wait.notify应用场景(生产者-消费者模式)>是一种生产者消费者模式实现,今晚这是Lock方式实现,下面是源码: 生产者代码: /** * 生产者 * * @auth ...
- ibatis的初识
在工作中,服务端的框架基本上是struts+spring+ibatis+velocity.ibatis曾经没有接触到,而曾经使用的hibernate在公司居然没碰着.同样都是数据库封装,为什么没有选择 ...