Spring JPA Query to find all strings that are part of a query string

I would like to explain my problem with an example. In mongodb I have a String column. Now I want to list all strings in that column which are part of my query string.

For example if my query string is “This is my test string”.

My ideal results would be

“This”,
“This is”,
“This is my”,
“is my”,
“is my test”,
“This is my test”,
“This is my test string” etc..,

In mysql I know “%Like%” would handle. I tried “Like” in mongo JPA but no luck.

Can anyone help me?

All topic