I have Cassandra table with below data:
cqlsh:test> SELECT * FROM test1 WHERE solr_query='{"q":"address:*"}';
name | address | age | solr_query
-------+------------------------------+-----+------------
test3 | road3 united states | 23 | null
test4 | road 123 canada | 23 | null
test2 | street2 united states | 22 | null
test1 | 123 california united states | 21 | null
test5 | 123 Texas united states | 23 | null
with schema:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<schema name="TestSolrSchema" version="1.5">
<types>
<fieldType class="org.apache.solr.schema.StrField" name="StrField"/>
<fieldType class="org.apache.solr.schema.TrieIntField" name="TrieIntField"/>
</types>
<fields>
<field docValues="true" indexed="true" multiValued="false" name="name" stored="true" type="StrField"/>
<field docValues="true" indexed="true" multiValued="false" name="address" stored="true" type="StrField"/>
<field docValues="true" indexed="true" multiValued="false" name="age" stored="true" type="TrieIntField"/>
</fields>
<uniqueKey>name</uniqueKey>
</schema>
the perfect match for the string with spaces work cqlsh:test> SELECT * FROM test1 WHERE solr_query='{"q":"address:\"123 california united states\""}';
name | address | age | solr_query
-------+------------------------------+-----+------------
test1 | 123 california united states | 21 | null
but if I want to search the string that startwith "123" (regex for string with space) it fails. (tried other solr query: {"q":"address:\"123\"*"})
cqlsh:test> SELECT * FROM test1 WHERE solr_query='{"q":"address:\"123\""}';
name | address | age | solr_query
------+---------+-----+------------
(0 rows)
is there a way to get regex done on the solr string field type with spaces?