Hi All,
I am using DSE for my solr queries . Currently I have a requirement for a solr index and cassandra secondary index to exist in same column family but different Columns , such that if I query column which is Solrbased Index , I also get Columns which are indexed through Cassandra.
My Schema.xml currently looks like -
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="cf4" version="1.1">
<types>
<fieldType name="text" class="solr.TextField"/>
</types>
<fields>
<field name="cidx1" type="text" indexed="false"/>
<field name="cidx2" type="text" indexed="false"/>
<field name="sidx1" type="text" indexed="true" stored="true"/>
<field name="sidx2" type="text" indexed="true" stored="true"/>
</fields>
<defaultSearchField>sidx1</defaultSearchField>
<uniqueKey>sidx1</uniqueKey>
</schema>
and my CF Definition -
CREATE COLUMN FAMILY cf4
WITH column_type = Standard
AND key_validation_class = 'UTF8Type'
AND comparator = 'UTF8Type'
AND default_validation_class = 'UTF8Type'
AND column_metadata = [
{column_name: sidx1, validation_class: UTF8Type}
{column_name: sidx2, validation_class: UTF8Type}
{column_name: cidx1, validation_class: UTF8Type, index_type: KEYS}
{column_name: cidx2, validation_class: UTF8Type, index_type: KEYS}
];
cidx1 and cidx2 are two columns indexed thorough cassandra , but need to be returned in Solr search query .
This is currently throwing Exception stating -
Not Solr-based type of index is found: testKeyspace1_cf4_cidx2_index"
However , if I send my schema.xml as-
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="cf4" version="1.1">
<types>
<fieldType name="text" class="solr.TextField"/>
</types>
<fields>
<field name="sidx1" type="text" indexed="true" stored="true"/>
<field name="sidx2" type="text" indexed="true" stored="true"/>
</fields>
<defaultSearchField>sidx1</defaultSearchField>
<uniqueKey>sidx1</uniqueKey>
</schema>
It Works fine , however when I query based on sidx1 OR sidx2 I donot get fields indexed through Cassandra cidx1 and cidx2 .
Please let me know if this case is achievable , or am I missing on something .
Thanks !
