lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1237496 - in /lucene/dev/branches/lucene2858/lucene/src: java/org/apache/lucene/index/SegmentMerger.java test/org/apache/lucene/index/TestPayloadProcessorProvider.java
Date Sun, 29 Jan 2012 22:28:05 GMT
Author: uschindler
Date: Sun Jan 29 22:28:04 2012
New Revision: 1237496

URL: http://svn.apache.org/viewvc?rev=1237496&view=rev
Log:
LUCENE-2858: PayloadProcessorProvider is no longer useable (disabled and nocommitted), as
AtomicIndexReader does not know the directory() concept anymore. It can be any reader be merged
in, so the selection of provider by directory can never work (and was broken before, too -
e.g. for SlowIR or FilterIR).

Modified:
    lucene/dev/branches/lucene2858/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
    lucene/dev/branches/lucene2858/lucene/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java

Modified: lucene/dev/branches/lucene2858/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/lucene/src/java/org/apache/lucene/index/SegmentMerger.java?rev=1237496&r1=1237495&r2=1237496&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
(original)
+++ lucene/dev/branches/lucene2858/lucene/src/java/org/apache/lucene/index/SegmentMerger.java
Sun Jan 29 22:28:04 2012
@@ -323,9 +323,9 @@ final class SegmentMerger {
       docBase += docCount;
 
       if (mergeState.payloadProcessorProvider != null) {
-        // nocommit: this was original, is the change correct:
+        // nocommit: this does not work anymore as SR/AtomicIndexReader does not know the
directory anymore:
         // mergeState.dirPayloadProcessor[i] = mergeState.payloadProcessorProvider.getDirProcessor(reader.reader.directory());
-        mergeState.dirPayloadProcessor[i] = mergeState.payloadProcessorProvider.getDirProcessor(directory);
+        throw new UnsupportedOperationException("PayloadProcessorProvider is not supported
at the moment :(");
       }
 
       i++;

Modified: lucene/dev/branches/lucene2858/lucene/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene2858/lucene/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java?rev=1237496&r1=1237495&r2=1237496&view=diff
==============================================================================
--- lucene/dev/branches/lucene2858/lucene/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java
(original)
+++ lucene/dev/branches/lucene2858/lucene/src/test/org/apache/lucene/index/TestPayloadProcessorProvider.java
Sun Jan 29 22:28:04 2012
@@ -37,7 +37,10 @@ import org.apache.lucene.store.Directory
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
+import org.junit.Ignore;
 
+@Ignore("This test does not work, as PerDirPayloadProcessor is currently broken (see nocommit
in SegmentMerger): "+
+  "SegmentReader/AtomicReader does not know its directory. This is borken, it should be a
PayLoadProcessorProvider per AtomicReader!")
 public class TestPayloadProcessorProvider extends LuceneTestCase {
 
   private static final class PerDirPayloadProcessor extends PayloadProcessorProvider {



Mime
View raw message