I want to search all case
First of all, if you want to "search," you need a different tool, like ElasticSearch. Cassandra is for key-based querying, which is very different from searching.
No, what you're looking to do really isn't possible with Cassandra, as it cares about case. I created the table definition described above, and inserted four rows, each with a different case application to Tom Hanks' name. Then I queried the results with the token
function:
aploetz@cqlsh:stackoverflow> SELECT actor,token(actor),title FROM video_by_actor ;
actor | system.token(actor) | title
-----------+----------------------+---------------------
Tom Hanks | -4258050846863339499 | Forrest Gump
Tom hanks | -3872727890651172910 | Saving Private Ryan
tom Hanks | -3300209463718095087 | Joe vs. the Volcano
tom hanks | 1022609553103151654 | Apollo 13
(4 rows)
Notice how each different case of "Tom Hanks" generated a different token. As this table is partitioning on actor
, this means that these rows will likely be stored on different nodes.
Again, you'll probably want to use an actual search engine for something like this. They will have tools like analyzers that can have features like "fuzzy matching" enabled.