There are several projects using custom secondary indexes as an extension point to integrate C* with other systems such as Solr or Lucene. The usual approach is to embed third party indexing queries in CQL clauses.
For example, DSE Search embeds Solr syntax this way:
Stratio platform embeds custom JSON syntax for searching in Lucene indexes:
Tuplejump Stargate also uses the Stratio's open source JSON syntax:
These syntaxes are validated by the corresponding 2i implementation. This validation is done behind the StorageProxy command distribution. So, far as I know, there is no way to give rich feedback about syntax errors to CQL users.
I'm uploading a patch with some changes trying to improve this. I propose adding an empty validation method to SecondaryIndexSearcher that can be overridden by custom 2i implementations:
And call it from SelectStatement#getRangeCommand:
In this way C* allows custom 2i implementations to give feedback about syntax errors.
We are currently using these changes in a fork with no problems.