You probably just need to escape the backslashes with a backslash - otherwise the query parser will treat your backslashes as escapes and remove them. This is not unlike placing a regex in a Java string literal.

-- Jack Krupansky

-----Original Message----- From: Hugh Cayless
Sent: Thursday, August 29, 2013 12:08 PM
To: solr-user@lucene.apache.org
Subject: regex constructs allowed in queries

Hi, I can't find anywhere good documentation of what syntax is allowed in Solr 4.4 regular expression searches. I can get regexes to work, but the same search with a predefined character class (like \s) or a word boundary matcher (\b) returns nothing. I am searching an untokenized field and using a plain space (' ') instead of '\s' works fine.

Is there a different escape syntax for regex constructs using a backslash? Is the regex support just incomplete? Or am I hitting some sort of bug?

Thanks,
Hugh=

Reply via email to