On 11/28/2012 10:16 AM, Jack Krupansky wrote:
Forward slash is now reserved for regular expression terms.
For the full list, see the Javadoc, here:
http://lucene.apache.org/core/4_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Escaping_Special_Characters
I don't know of any change related to apostrophe. That may be token
filter-specific. Maybe related to possessive removal. In what context
is it a problem?
Thanks, that javadoc will be very helpful.
Here's the query showing the apostrophe problem, pulled from our search
logs:
q=( (MEXICO DAY OF THE DEAD CELEBRATION 'TRADITIONS OF LIFE AND DAY'))
This is the error msg I can see in my browser when I send that to Solr
4.1-SNAPSHOT from 2012/11/26. I am not doing any testing with the 4.0.0
release:
org.apache.solr.search.SyntaxError: Cannot parse '( (MEXICO DAY OF THE
DEAD CELEBRATION 'TRADITIONS OF LIFE AND DAY'))': Encountered "
<SQUOTED> "\'TRADITIONS OF LIFE AND DAY\' "" at line 1, column 41.
Was expecting one of:
<AND> ...
<OR> ...
<NOT> ...
"+" ...
"-" ...
<BAREOPER> ...
"(" ...
")" ...
"*" ...
"^" ...
<QUOTED> ...
<TERM> ...
<FUZZY_SLOP> ...
<PREFIXTERM> ...
<WILDTERM> ...
<REGEXPTERM> ...
"[" ...
"{" ...
<LPARAMS> ...
<NUMBER> ...
The same query against 3.5.0 works. When I add backslashes to single
quotes for the query against either version, it works. The escaped query
has the same numFound on both 3.5 and 4.1 as the unescaped query does
against 3.5. Escaped query:
q=( (MEXICO DAY OF THE DEAD CELEBRATION \'TRADITIONS OF LIFE AND DAY\'))
Is this a change that's new in 4.1, or is it perhaps a bug?
Thanks,
Shawn