1
votes

I am looking for a query parser which can help me filter (write 'where' clause) with a field in JSON format column (UDT - User Defined Type). I am using Cassandra as DB and Solr. I am finding it challenging to integrate Solr with Cassandra. I found DataStax Search as an option but it doesn't seem to support Windows OS. It would be great if anyone could suggest a good alternative.

Edit: An example to make it simpler to understand: I have the following sample UDT which is used in a table:

CREATE TYPE test.phone ( code int, number text );

CREATE TABLE test.info ( id int PRIMARY KEY, contact phone, .... );

Selection can be done as: SELECT contact.code FROM info;

However, filtering using a field in UDT is NOT POSSIBLE: SELECT * FROM info WHERE contact.code = 91;

To achieve the above, I have installed a query parser but I am having issues integrating it with Cassandra. I am looking for an alternative.

1
I also tried Solandra. But there is no proper installation guide for it. I am not a Java programmer and hence having a hard time configuring it.Shilpa
@AshrafulIslam: Thanks for your comment. But, I am looking for a solution to filter with UDTs - User Defined Types. The link is more about working with non-primary columns which are not of user defined types.Shilpa

1 Answers

0
votes

I came across Cassandra-lucene-index that can filter using the UDT exactly as expected. It can be installed on Windows OS and is very simple to use.

It can be downloaded from https://github.com/Stratio/cassandra-lucene-index The version should be exactly same as the version of Cassandra already installed on the system. The JAR file is to be placed in the folder $Cassandra_HOME/lib. Restart/start Cassandra and it begins to work.

It also has a good documentation for installation and querying: https://github.com/Stratio/cassandra-lucene-index/blob/branch-3.0.13/doc/documentation.rst

Edit: I do not need Solr anymore.