在solr中加入三个表
Joining three tables in solr
我正在尝试使用 Solr 连接三个 cassandra 表。根据 datastax 文档,
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.
我可以按照文档加入两个表。我想知道我是否可以将三个满足条件的表连接在一起。找不到有关连接两个以上表的任何文档。我迫切需要加入三个表。真的有可能还是我应该立即放弃这个想法?
我需要的是递归连接。从与上述示例相同的文档中,我可以找到这个示例:
Use a nested join query to recursively join the songs and lyrics documents with the videos document, and to select the song that mentions love and also won a video award.
http://localhost:8983/solr/internet.songs/select/?q=
{!join+fromIndex=internet.lyrics}words:love AND _query_:
{!join+fromIndex=internet.videos}award:true&indent=true&wt=json
Output is:
"response":{"numFound":1,"start":0,"docs":[
{
"song":"a3e64f8f-bd44-4f28-b8d9-6938726e34d4",
"title":"Dangerous",
"artist":"Big Data"}]
}}
我正在尝试使用 Solr 连接三个 cassandra 表。根据 datastax 文档,
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.
我可以按照文档加入两个表。我想知道我是否可以将三个满足条件的表连接在一起。找不到有关连接两个以上表的任何文档。我迫切需要加入三个表。真的有可能还是我应该立即放弃这个想法?
我需要的是递归连接。从与上述示例相同的文档中,我可以找到这个示例:
Use a nested join query to recursively join the songs and lyrics documents with the videos document, and to select the song that mentions love and also won a video award.
http://localhost:8983/solr/internet.songs/select/?q=
{!join+fromIndex=internet.lyrics}words:love AND _query_:
{!join+fromIndex=internet.videos}award:true&indent=true&wt=json
Output is:
"response":{"numFound":1,"start":0,"docs":[
{
"song":"a3e64f8f-bd44-4f28-b8d9-6938726e34d4",
"title":"Dangerous",
"artist":"Big Data"}]
}}