You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2007/03/13 10:18:09 UTC

[jira] Created: (JCR-788) Upgrade to Lucene 2.1

Upgrade to Lucene 2.1
---------------------

                 Key: JCR-788
                 URL: https://issues.apache.org/jira/browse/JCR-788
             Project: Jackrabbit
          Issue Type: Improvement
          Components: query
            Reporter: Marcel Reutegger
            Priority: Minor


Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:

- less locking on index updates -> less IO calls
- introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Commented: (JCR-788) Upgrade to Lucene 2.1

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484372 ] 

Marcel Reutegger commented on JCR-788:
--------------------------------------

Lucene 2.1 can read index files created with previous releases, but will write new files in the 2.1 version. Once you upgrade to  2.1 you cannot go back anymore, unless you re-index the repository.

Because lucene 2.1 is not yet available in a maven 2 repository and the change is only minor I would rather keep the 2.0 compile dependency in the pom. I suggest the following change:

Index: PersistentIndex.java
===================================================================
--- PersistentIndex.java	(revision 520911)
+++ PersistentIndex.java	(working copy)
@@ -42,7 +42,7 @@
     private static final String WRITE_LOCK = IndexWriter.WRITE_LOCK_NAME;
 
     /** Name of the commit lock file */
-    private static final String COMMIT_LOCK = IndexWriter.COMMIT_LOCK_NAME;
+    private static final String COMMIT_LOCK = "commit.lock";
 
     /** The name of this persistent index */
     private final String name;

This allows the sources to compile with either 2.0 or 2.1.

I think it is actually possible to upgrade lucene without this change because the compiler puts the commit.lock literal into the PersistentIndex class file and therefore removes the dependency to the IndexWriter.COMMIT_LOCK_NAME field.

> Upgrade to Lucene 2.1
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>         Attachments: patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Commented: (JCR-788) Upgrade to Lucene 2.1

Posted by "David Johnson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484230 ] 

David Johnson commented on JCR-788:
-----------------------------------

I have upgraded my local version to Lucene 2.1

I needed to change 2 files - the pom.xml of jackrabbit-core and org.apache.jackrabbit.core.query.lucene.PersistentIndex.java

While all tests pass, I am not sure if my change to PersistentIndex is right - specifically I commented out the code pertaining to COMMIT_LOCK as this seems to have been removed or moved to another class in Lucene 2.1

Is this worth a patch?  As Marcel stated, this appears to be a good upgrade, so I would like to get this in sooner rather than later.

> Upgrade to Lucene 2.1
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Assigned: (JCR-788) Upgrade to Lucene 2.2

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

Jukka Zitting reassigned JCR-788:
---------------------------------

    Assignee: Jukka Zitting

> Upgrade to Lucene 2.2
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Assignee: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: lucene_2.2.0_patch.diff, patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Commented: (JCR-788) Upgrade to Lucene 2.1

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484243 ] 

Jukka Zitting commented on JCR-788:
-----------------------------------

Please do share a patch with your changes. It's always easier to judge a change if the actual code is available. BTW, would the modified class still work with Lucene 2.0? I also assume that Lucene 2.1 is compatible with indexes created with 2.0.

I agree that we should try to keep up with Lucene upgrades, but on the other hand I would not want to force too frequent dependency changes on users. If the change works with Lucene 2.0, then existing users wouldn't need to upgrade their dependencies. If not, then the upgrade procedure needs to be documented in the release notes.

If there is no immediate demand for the upgrade, I would rather wait until Jackrabbit 1.3 is branched before doing this.

> Upgrade to Lucene 2.1
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Updated: (JCR-788) Upgrade to Lucene 2.2

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

Jukka Zitting updated JCR-788:
------------------------------

    Summary: Upgrade to Lucene 2.2  (was: Upgrade to Lucene 2.1)

Lucene 2.2 was just released with even more good stuff. The artifacts and proper POMs are also now up on the central Maven repository.

Updated issue summary to upgrade to Lucene 2.2 instead of 2.1.

> Upgrade to Lucene 2.2
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Updated: (JCR-788) Upgrade to Lucene 2.1

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

David Johnson updated JCR-788:
------------------------------

    Attachment: patch.txt

Patch file for upgrade to Lucene 2.1.0

> Upgrade to Lucene 2.1
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>         Attachments: patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Resolved: (JCR-788) Upgrade to Lucene 2.2

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

Jukka Zitting resolved JCR-788.
-------------------------------

    Resolution: Fixed

Excellent! Patch applied in revision 558194.

> Upgrade to Lucene 2.2
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Assignee: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: lucene_2.2.0_patch.diff, patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Updated: (JCR-788) Upgrade to Lucene 2.1

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

Jukka Zitting updated JCR-788:
------------------------------

    Fix Version/s: 1.4

Tagging the actual POM dependency upgrade for Jackrabbit 1.4.

> Upgrade to Lucene 2.1
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Updated: (JCR-788) Upgrade to Lucene 2.2

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

fabrizio giustina updated JCR-788:
----------------------------------

    Attachment: lucene_2.2.0_patch.diff

The attached patch upgrades the lucene dependency to 2.2.0 (pom update + just a few additional methods added in FilteredTermPositions).
Tests run fine after the patch, you should be able to apply this without problems.

> Upgrade to Lucene 2.2
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: lucene_2.2.0_patch.diff, patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Updated: (JCR-788) Upgrade to Lucene 2.2

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

Jukka Zitting updated JCR-788:
------------------------------

    Component/s: jackrabbit-core

> Upgrade to Lucene 2.2
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, query
>            Reporter: Marcel Reutegger
>            Assignee: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: lucene_2.2.0_patch.diff, patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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


[jira] Commented: (JCR-788) Upgrade to Lucene 2.1

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484800 ] 

Marcel Reutegger commented on JCR-788:
--------------------------------------

Committed above mentioned patch in revision: 523265

> Upgrade to Lucene 2.1
> ---------------------
>
>                 Key: JCR-788
>                 URL: https://issues.apache.org/jira/browse/JCR-788
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: query
>            Reporter: Marcel Reutegger
>            Priority: Minor
>         Attachments: patch.txt
>
>
> Lucene 2.1 contains a number of useful enhancements, which could be benefical to jackrabbit:
> - less locking on index updates -> less IO calls
> - introduces FieldSelector -> allows jackrabbit to only load required fields

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