diff --git a/plugin/src/main/scala/com/stratio/cassandra/lucene/IndexQueryHandler.scala b/plugin/src/main/scala/com/stratio/cassandra/lucene/IndexQueryHandler.scala index e3909611..6eb805a7 100644 --- a/plugin/src/main/scala/com/stratio/cassandra/lucene/IndexQueryHandler.scala +++ b/plugin/src/main/scala/com/stratio/cassandra/lucene/IndexQueryHandler.scala @@ -119,13 +119,15 @@ class IndexQueryHandler extends QueryHandler with Logging { def luceneExpressions( select: SelectStatement, options: QueryOptions): Map[Expression, Index] = { - val map = mutable.LinkedHashMap.empty[Expression, Index] - val expressions = select.getRowFilter(options).getExpressions - if (select.keyspace() == "system_virtual_schema") { + val keyspaceOfSelect = select.keyspace() + if (keyspaceOfSelect == "system_virtual_schema" || keyspaceOfSelect == "system_views") { return Map.empty } + val map = mutable.LinkedHashMap.empty[Expression, Index] + val expressions = select.getRowFilter(options).getExpressions + val cfs = Keyspace.open(select.keyspace).getColumnFamilyStore(select.table.id) val indexes = cfs.indexManager.listIndexes.asScala.collect { case index: Index => index } expressions.forEach {