jirutka/rsql-parser

~ reserved word

kamaydeo opened this issue · 3 comments

This is more of a question. I noticed that ~ is reserved but I don't see it in the supported operators. I would like to use ~ for fuzzy searches e.g q=name=~bob

However, this is not allowed since it's a reserved keyword. Can you explain the use for "~"?

kaush commented

I agree. I wanted to create LIKE(~=), NOT_LIKE(!~=) etc, but ComparisonOperator won't allow it.
Tilde (~) fits naturally with regex type searches and is URL safe.

Tilde (~) fits naturally with regex type searches and is URL safe.

That’s the exact reason why it’s reserved, so I can add ~= operator in future.

any update for adding ~= ?

i am following this article, which uses == and replaces *'s with % and does like ... so my problem was always solved.