You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2009/10/21 14:32:59 UTC

[jira] Created: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

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
             Fix For: 3.0, 2.9


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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-2002:
---------------------------------------

    Attachment: LUCENE-2002.patch

Patch for trunk; I plan to commit soon...

> 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, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768838#action_12768838 ] 

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

bq. OK I'll take that approach, and I guess make a unit test that peeks & confirms these methods are still protected (to catch us in the future).

We may want to see if it can be automated in the ANT task so that we don't have to remember to do it by hand each time.  

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768294#action_12768294 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

Uwe I can take this if you want?  Have you started?

> 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
>             Fix For: 2.9.1
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768840#action_12768840 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. We may want to see if it can be automated in the ANT task so that we don't have to remember to do it by hand each time.

That would be fabulous but is way beyond my ant skills :)  Any ant pros out there want to try?

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768740#action_12768740 ] 

Robert Muir commented on LUCENE-2002:
-------------------------------------

{quote}
Or, with this issue I could add Version to all contrib analyzers that embed StopFilter. I think I like that solution better (we shouldn't be using static defaults). I'll go forward w/ that shortly unless any objections come up... this'd also take care of analyzers that use StandardTokenizer (ie, we'll control fixing the acronym bug with Version as well).
{quote}

Michael, if you do this, can you mark LUCENE-1373 as resolved? :)

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768845#action_12768845 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

Eric Hatcher :-)

Maybe the search-replace with regex functionality can do it.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-2002.
-----------------------------------

    Resolution: Fixed

I reopened it -> I resolve it :-)

At revision: 830910

> 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-wrongdefault.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768467#action_12768467 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

Eek!  My fingers are doing the thinking, apparently :)  Been typing that word a bit too much!!  I'll fix.  Thanks.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768711#action_12768711 ] 

Mark Miller commented on LUCENE-2002:
-------------------------------------

I think we need more doc as well - stopfilter is not just tied to standardanalyzer - standardanalyzer just happens to use it. Many analyzers can use a stopfilter and one of the stopfilters params is to enable or disable this setting.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768393#action_12768393 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

Issue created!

> 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
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769299#action_12769299 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

Actually to port to trunk I was going svn merge, remove conflicts, remove merged in but deprecated methods, then fix all resulting compilation/test errors.  I'll try to do this myself... wish me luck ;)  I'm only using emacs over here!!

> 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, LUCENE-2002-29.patch, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768459#action_12768459 ] 

Robert Muir commented on LUCENE-2002:
-------------------------------------

Mike, saw a couple of these and laughed a little :)

@param matchVersion Lucene version to *patch*; this is passed through to QueryParser.


> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769218#action_12769218 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

I am happy to then use the merge operations in SVN tru apply this in trunk!

+1 from my side!

> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769412#action_12769412 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. So the QueryParser ctors should also use the TEST_VERSION constant, so that it can be easily updated to do the testing for various versions.

Good idea -- I'll fix!

> 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, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2002:
----------------------------------

    Attachment: LUCENE-2002-29-wrongdefault.patch

> 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-wrongdefault.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-2002:
---------------------------------------

    Attachment: LUCENE-2002-29.patch

Attached patch, for 2.9..x

I added required Version param to QueryParser, MultiFieldQueryParser
and ComplexPhraseQueryParser (contrib), which enable position
increments when matchVersion >= LUCENE_19.

For the deprecated ctors it defaults to Version.LUCENE_24 for back
compat.

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.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768747#action_12768747 ] 

Robert Muir commented on LUCENE-2002:
-------------------------------------

bq. Ahh yes indeed. Is there a corresponding issue about not being able to control stop filter pos incr? Can't keep track of all these issues anymore!
Michael, what about LUCENE-1258?

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769203#action_12769203 ] 

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

Yes, they are near the $Id tags.  That's kind of an odd error, though. At any rate, I'm running the tests now.

> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769235#action_12769235 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

I know this problem of trunk. But the first step is to merge the changes in and then remove the deprecated parts again. Then fixing of tests, which may be many as QueryParser is used almost everywhere. Maybe we can split contrib/core.

> 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, LUCENE-2002-29.patch, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Reopened: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler reopened LUCENE-2002:
-----------------------------------


For Lucene 2.9, the deafult in StopFilter is not controlable, if you use the no-arg Analyzer ctor. There was the previous static setter in StopFilter which is now without any use.

Attached patch fixes this, to return ENABLE_POSITION_INCREMENTS_DEFAULT in getEnablePositionIncrementsVersionDefault() for all versions<2.9

> 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-wrongdefault.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768308#action_12768308 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. Add another issue?

+1!

> 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
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-2002.
----------------------------------------

    Resolution: Fixed

> 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, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768738#action_12768738 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. Many analyzers can use a stopfilter and one of the stopfilters params is to enable or disable this setting.

In fact, I think we may have to un-deprecate StopFilter.get/setEnablePositionIncrementsDefault for this reason?  Many analyzers do embed StopFilter without exposing control over this setting, and so the only way (up to & including 2.9) to change the setting is to set the static default with StopFilter.  If we remove that then we've taken that control away.

Or, with this issue I could add Version to all contrib analyzers that embed StopFilter.  I think I like that solution better (we shouldn't be using static defaults).  I'll go forward w/ that shortly unless any objections come up... this'd also take care of analyzers that use StandardTokenizer (ie, we'll control fixing the acronym bug with Version as well).

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768744#action_12768744 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. Michael, if you do this, can you mark LUCENE-1373 as resolved?

Ahh yes indeed.  Is there a corresponding issue about not being able to control stop filter pos incr?  Can't keep track of all these issues anymore!

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-2002:
---------------------------------------

    Attachment: LUCENE-2002-29.patch

New patch attached.  All tests pass.  Changes:

  * Fixed the "patch" -> "match" typo

  * Fixed build.xml to make 2 autogen'd (by JavaCC) public QueryParser
    ctors protected, and added unit test to assert this

  * Added Version matchVersion param to all (I think!) contrib
    analyzers that instantiate either StandardTokenizer (to manage
    changing the "fix invalid acronym" setting across versions), or
    StopFilter (to manage "enable pos incr" setting across versions),
    or, both, and threaded it down to StandardTokenizer & StopFilter

I didn't add Version to StopFilter nor StopAnalyzer; I think it's
better to up-front require the "enablePositionIncrements" to their
ctors.


> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768301#action_12768301 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

During 1987, I also found a bug in Highlighter, which is also not able to handle the posIncr of stopwords correctly. Add another issue?

> 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
>             Fix For: 2.9.1
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768878#action_12768878 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

Cool. Did you check the minimum ANT version needed for this? If the current BUILD.txt minimum does not fit, we shoudl update the build, docs. My problem: I didn't found the minimum version for replaceregexp in the docs.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769213#action_12769213 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

They only appear with native patch. All higher-level svn related patch impls "know" this. I think bekause oth this they were removed in trunk.

> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768889#action_12768889 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

I think we are good: I just looked @ 1.6.3's javadocs (we specify ant 1.6.3 in BUILD.txt) and it's got the replaceregexp task.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769214#action_12769214 ] 

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

+1 on this patch.

> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768733#action_12768733 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. Thus, I think, unfortunately, the answer just might be to edit the generated Java file by hand and make them be protected.

OK I'll take that approach, and I guess make a unit test that peeks & confirms these methods are still protected (to catch us in the future).

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769406#action_12769406 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

A mega patch, one thing:

The highlighter testcase uses a separate constant for the version. My idea was to iterate over all version constants and run the test several times to test all combinations.

So the QueryParser ctors should also use the TEST_VERSION constant, so that it can be easily updated to do the testing for various versions.

> 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, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Issue Comment Edited: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768845#action_12768845 ] 

Uwe Schindler edited comment on LUCENE-2002 at 10/22/09 7:59 PM:
-----------------------------------------------------------------

Eric Hatcher :-)

Maybe the search-replace with regex functionality can do it.
see: [http://ant.apache.org/manual/OptionalTasks/replaceregexp.html]

      was (Author: thetaphi):
    Eric Hatcher :-)

Maybe the search-replace with regex functionality can do it.
  
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769232#action_12769232 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. I am happy to then use the merge operations in SVN tru apply this in trunk!

Are you offering to port this to trunk?  That'd be nice :)  I wasn't looking forward to that part!

Note that on trunk it'll be fairly difference since we'll remove (not deprecate) the old methods, and, we have to go fix all usage of the deprecated APIs (eg in tests, contrib) which I haven't done (which I haven't done for 2.9).

> 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, LUCENE-2002-29.patch, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768295#action_12768295 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

Take it! I haven't started.

> 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
>             Fix For: 2.9.1
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769196#action_12769196 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. I'm getting errors applying this, but they look like they are just in the javadoc comments..

Are the patch errors near the $Id$  tags?  (Which we've removed from trunk, for this reason).

bq. I would add it to StopAnalyzer

OK I'll add.

> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-2002:
---------------------------------------

    Fix Version/s:     (was: 3.0)
                       (was: 2.9)
                   2.9.1

> 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
>             Fix For: 2.9.1
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768874#action_12768874 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq. Maybe the search-replace with regex functionality can do it.

Excellent!  That worked like a charm.  I'll still leave the unit test in place to catch us if this fails...

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771377#action_12771377 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

Patch looks good Uwe, thanks!

> 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-wrongdefault.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002-29.patch, LUCENE-2002.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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless reassigned LUCENE-2002:
------------------------------------------

    Assignee: Michael McCandless

> 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
>
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769190#action_12769190 ] 

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

I'm getting errors applying this, but they look like they are just in the javadoc comments..

> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-2002:
---------------------------------------

    Attachment: LUCENE-2002-29.patch

New patch, adding Version to StopAnalyzer as well.

Thanks for reviewing -- I'll commit in a bit!

> 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, LUCENE-2002-29.patch, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768752#action_12768752 ] 

Michael McCandless commented on LUCENE-2002:
--------------------------------------------

bq.  Michael, what about LUCENE-1258?

Oh yeah, and look who opened that one :)   I'll go resolve as a dup of this one.

> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2002) Add oal.util.Version ctor to QueryParser

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768907#action_12768907 ] 

Uwe Schindler commented on LUCENE-2002:
---------------------------------------

Looks good.

bq. I didn't add Version to StopFilter nor StopAnalyzer; I think it's better to up-front require the "enablePositionIncrements" to their ctors.

I would add it to StopAnalyzer, StopFilter is not so important (because low-level). But that's my opinion.

> 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, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org