Right. I don't mind that SASI is not implemented on collections and OR is not supported... well, I do, but that's neither here nor there.
The surprise was that including both a SASI and a non-SASI in the same where clause causes a runtime exception. On Sat, Oct 29, 2016 at 3:13 AM, DuyHai Doan <doanduy...@gmail.com> wrote: > There was a plan to replace the native 2nd index by SASI. There are a > couple of JIRA on SASI to support collection & OR clause but all of them > are blocked by some internal refactoring. I don't know the current status > of it. Pavel is quite idle recently > > On Sat, Oct 29, 2016 at 3:25 AM, Voytek Jarnot <voytek.jar...@gmail.com> > wrote: > >> Scenario (running 3.9, by the way): >> >> CREATE TABLE atc_test1.idxtest ( >> pk text PRIMARY KEY, >> col1 text, >> col2 text); >> CREATE CUSTOM INDEX idx2 ON atc_test1.idxtest (col2) USING ' >> org.apache.cassandra.index.sasi.SASIIndex'; >> CREATE INDEX idx1 ON atc_test1.idxtest (col1); >> >> Queries: >> >> Works: select * from idxtest where col1='asdf'; >> Works: select * from idxtest where col2='asdf'; >> >> Does not work: select * from idxtest where col1='asdf' and col2='asdf' >> allow filtering; >> >> Cassandra logs the following: >> java.lang.ClassCastException: org.apache.cassandra.index.int >> ernal.composites.RegularColumnIndex cannot be cast to >> org.apache.cassandra.index.sasi.SASIIndex >> >> I'm guessing the takeaway is that once you go SASI you're committed to >> only SASI? Unfortunately - in our case - the non-SASI index is in place >> because one can't do a SASI index on a map column. >> >> Questions: >> >> Anyone else encounter this? Any workarounds you're willing to share? >> >> Seems like throwing a runtime exception is not a terrific way of handling >> this... makes me wonder if there's something amiss with my particular >> instance/config or if this is simply the way it is... >> > >