Subtring Matching without Regex?

Continuing the discussion from Simple substring matching without trigram index:

The above topic was closed with no replies. So opening anew.

@BlakeMScurr, are you still around? What did you find out?

I want to allow users to search for an exact phrase. Here is what I have looked at:

  • eq - matches string as whole and not substring, so no matches unless ===
  • anyofterms/allofterms - matches terms in a string and not exact phrase, gives false positives
  • anyoftext/alloftext - does more thought matching than phrase matching as it removes stop words, gives false positives.
  • regex - Not as user friendly as the other equality functions above. Requires search string be transformed into a regex, which may not always be wanted. I want to find the text exactly and do not count this . as any character, nor error out because I want to find a ( without a ).

What else is there?

Maybe this somewhat relates to: String Functions in DQL

I think this can be achieved if we get the string functions in place (those here -> String Functions in DQL). If we could have substring() then we can do something like:

eq(name, substring("mas"))

I think this would do exactly what you have mentioned in this post. I really love the idea of having those string functions.