jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-788) Upgrade to Lucene 2.1
Date Tue, 27 Mar 2007 09:26:32 GMT

    [ 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.


Mime
View raw message