0
votes

I know there have been solutions for search on top of Cassandra, for example, cassandra-lucene-index. So I am not finding a solution here, I am just curious about some implementations.

I found two projects: KairosDB(a time-series database built on Cassandra for monitoring data) and Infinispan(a distributed cache that can use Cassandra as cache store), both of which implement own search layer. They have similar Cassandra schemas that store data as blob, for example, Infinispan:

CREATE KEYSPACE IF NOT EXISTS Infinispan WITH replication = {'class':'SimpleStrategy', 'replication_factor':1}; CREATE TABLE Infinispan.InfinispanEntries (key blob PRIMARY KEY, value blob, metadata blob);

I looked into KairosDB code, it does search by reading a range of data then do in-memory filtering by some tags. I haven't investigated into Infinispan yet.

I am wondering if there is any algorithm just for this kind of thing? That says, storing data as binary then do a search by filtering?

2
Was this question answered?K.Boyette
@K.Boy thanks for the answer. However, the article posted by doanduyhai is well explained my question.zx_wing

2 Answers

1
votes

That says, storing data as binary then do a search by filtering?

If you store your data as blob, how can you index it ?

So I am not finding a solution here, I am just curious about some implementations.

Just read the source code of Stratio Lucene Index or SASI index then

0
votes

My reputation isn't high enough to post a comment and I don't think this will warrant an answer, but there is Solr integrated with Cassandra. It's pretty cool and it allows your to perform a search on Cassandra data.

A query could look like

SELECT name FROM keyspace.table WHERE solr_query='name:euler name:jane -name:john'; 

Note: The Solr Query is put inside the where clause.

The question seems a bit broad, but this is another option for you. It leverages the read speed of Solr, the write speed of Cassandra, and the overhead and learning curve of both.

https://docs.datastax.com/en/datastax_enterprise/4.0/datastax_enterprise/srch/srchIntro.html

https://docs.datastax.com/en/datastax_enterprise/4.6/datastax_enterprise/srch/srchCql.html