Re: regex constructs allowed in queries

2013-08-30 Thread Hugh Cayless
Yeah, upon re-reading the grammar, you're quite right. backslash escapes are legal, but there doesn't look like there's any concept of a predefined character class. For whatever reason, it looks to me like Lucene is just implementing its own regex matching—which may make complete sense for reaso

Re: regex constructs allowed in queries

2013-08-29 Thread Steve Rowe
You can see the supported syntax here: . On Aug 29, 2013, at 11:57 AM, "Hugh Cayless, Ph.D." wrote: > Hi, I can't find anywhere good documentation of what syntax is allowed in > Solr 4.4 regular expression

Re: regex constructs allowed in queries

2013-08-29 Thread Chris Hostetter
Thanks for the full details -- being able to see exactly how the queries are recieved & parsed is important for rulling out simple things like client side escaping (or lack of) and server side metacharacter handling in the query parser. : Some things work the way I'd expect, some clearly don't

Re: regex constructs allowed in queries

2013-08-29 Thread Hugh Cayless
The context for this is that I'm migrating an application from Solr 3.5 to 4.4. We had regex search working (in kind of a hacky way), but since 4.x has regex search support built in, I'm trying to switch to that. Some things work the way I'd expect, some clearly don't. So my question was, in the

Re: regex constructs allowed in queries

2013-08-29 Thread Chris Hostetter
: 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 docs on solr's query parser syntax should be pointing you here... https://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparse

Re: regex constructs allowed in queries

2013-08-29 Thread Jack Krupansky
require a THIRD level of escaping (four backslashes for each backslash to be used in a regex), such as if you were using SolrJ. -- Jack Krupansky -Original Message- From: Hugh Cayless Sent: Thursday, August 29, 2013 12:49 PM To: solr-user@lucene.apache.org Subject: Re: regex constructs

Re: regex constructs allowed in queries

2013-08-29 Thread Hugh Cayless
Tried that, I'm afraid. No joy. I'm trying to step a search through with a debugger attached to see if I can tell why it's not acting right… On Aug 29, 2013, at 12:23 , Jack Krupansky wrote: > You probably just need to escape the backslashes with a backslash - otherwise > the query parser will

Re: regex constructs allowed in queries

2013-08-29 Thread Jack Krupansky
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,