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

Grant Ingersoll commented on LUCENE-2002:
-----------------------------------------

{quote}Unfortunately, JavaCC generates two public ctors for QueryParser (one 
taking
CharStream, another taking QueryParserTokenManager) that I don't know
how to override to take a Version param.
{quote}

Those two constructors are bad anyway b/c if anyone calls them, it won't set 
the Analyzer, etc.  Thus, I think, unfortunately, the answer just might be to 
edit the generated Java file by hand and make them be protected.  I've looked 
through the JavaCC docs and I don't see any other way.  Of course, the big down 
side to this is we now need to do this going forward. 


> Add oal.util.Version ctor to QueryParser
> ----------------------------------------
>
>                 Key: LUCENE-2002
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2002
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9, 3.0
>            Reporter: Uwe Schindler
>            Assignee: Michael McCandless
>             Fix For: 2.9.1
>
>         Attachments: LUCENE-2002-29.patch
>
>
> This is a followup of LUCENE-1987:
> If somebody uses StandardAnalyzer with Version.LUCENE_CURRENT and then uses 
> QueryParser, phrase queries will not work, because the StopFilter enables 
> position Increments for stop words, but QueryParser ignores them per default. 
> The user has to explicitely enable them.
> This issue would add a ctor taking the Version constant and automatically 
> enable this setting. The same applies to the contrib queryparser. Eventually 
> also StopAnalyzer should add this version ctor.
> To be able to remove the default ctor for 3.0 (to remove a possible trap for 
> users of QueryParser), it must be deprecated and the new one also added to 
> 2.9.1.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to