jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r915718 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java
Date Wed, 24 Feb 2010 08:19:09 GMT
Author: mreutegg
Date: Wed Feb 24 08:19:09 2010
New Revision: 915718

URL: http://svn.apache.org/viewvc?rev=915718&view=rev
Log:
JCR-2505: High memory usage on node with multi-valued string properties

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java?rev=915718&r1=915717&r2=915718&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java
Wed Feb 24 08:19:09 2010
@@ -16,12 +16,13 @@
  */
 package org.apache.jackrabbit.core.query.lucene;
 
+import java.io.IOException;
+import java.io.Reader;
+
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 
-import java.io.Reader;
-
 /**
  * This is the global jackrabbit lucene analyzer. By default, all
  * properties are indexed with the <code>StandardAnalyzer(new String[]{})</code>,
@@ -74,4 +75,15 @@
         return defaultAnalyzer.tokenStream(fieldName, reader);
     }
 
+    @Override
+    public TokenStream reusableTokenStream(String fieldName, Reader reader)
+            throws IOException {
+        if (indexingConfig != null) {
+            Analyzer propertyAnalyzer = indexingConfig.getPropertyAnalyzer(fieldName);
+            if (propertyAnalyzer != null) {
+                return propertyAnalyzer.reusableTokenStream(fieldName, reader);
+            }
+        }
+        return defaultAnalyzer.reusableTokenStream(fieldName, reader);
+    }
 }



Mime
View raw message