[ 
https://issues.apache.org/jira/browse/LUCENE-7355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363890#comment-15363890
 ] 

David Smiley commented on LUCENE-7355:
--------------------------------------

I suspect there may be a problem with your regexp: 
{noformat}Pattern.compile("(\\.)|([?*]+)");{noformat}
Shouldn't those back slashes be doubled up yet again -- escape Java String and 
escape Regexp:
{noformat}Pattern.compile("(\\\\.)|([?*]+)");{noformat}

When I applied the patch and set a breakpoint at the "continue" in the 
condition that looks for group(1) it never hit for TestQueryParser.  When I 
updated the regexp as above it did.  It's getting late for me so maybe I'm 
missing something obvious.

The only other thing is that I'm surprised that the javadocs for normalize() 
don't mention anything about Wildcard/MultiTermQueries.  Shouldn't it to 
clarify it's intended use?

> Leverage MultiTermAwareComponent in query parsers
> -------------------------------------------------
>
>                 Key: LUCENE-7355
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7355
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7355.patch, LUCENE-7355.patch, LUCENE-7355.patch, 
> LUCENE-7355.patch
>
>
> MultiTermAwareComponent is designed to make it possible to do the right thing 
> in query parsers when in comes to analysis of multi-term queries. However, 
> since query parsers just take an analyzer and since analyzers do not 
> propagate the information about what to do for multi-term analysis, query 
> parsers cannot do the right thing out of the box.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to