0
votes

Recently I am working with on a Cassandra database project in which I am using Solr with DSE for partial search.

I read in some documents about join query by using Solr, but not able to get a clear idea. Can anyone tell me :- joining of two tables for getting single row result are possible with Solr in DSE or not.

If it is possible then please give me some example. and if not possible then what will be the alternate method for join in Datastax .

1

1 Answers

0
votes

Joins in Datastax Search or Spark fall into some very strict boundries.

DataStax Enterprise 4.0.2 and later supports the OS Solr query time join through a custom implementation. You can join Solr documents, including those having different Solr cores under these conditions:

  • Solr cores need to have the same keyspace and same Cassandra partition key.
  • Both Cassandra tables that support the Solr cores to be joined have to be either Thrift- or CQL-compatible. You cannot have one that is Thift-compatible and one that is CQL-compatible.
  • The type of the unique key (Cassandra key validator of the partition key) are the same.
  • The order of table partition keys and schema unique keys are the same.

Provided all that is true then here is an example of how to join:

http://localhost:8983/solr/keyspace.solr_table1/select/?q={!join+fromIndex=keyspace.solr_table2}key:value