org.apache.lucene.index
Class PayloadProcessorProvider
java.lang.Object
org.apache.lucene.index.PayloadProcessorProvider
public abstract class PayloadProcessorProvider
- extends Object
Provides a PayloadProcessorProvider.ReaderPayloadProcessor
to be used for a Directory
.
This allows using different PayloadProcessorProvider.ReaderPayloadProcessor
s for different
source AtomicReader
, for e.g. to perform different processing of payloads of
different directories.
NOTE: to avoid processing payloads of certain directories, you can
return null
in getReaderProcessor(org.apache.lucene.index.AtomicReader)
.
NOTE: it is possible that the same PayloadProcessorProvider.ReaderPayloadProcessor
will be
requested for the same Directory
concurrently. Therefore, to avoid
concurrency issues you should return different instances for different
threads. Usually, if your PayloadProcessorProvider.ReaderPayloadProcessor
does not maintain state
this is not a problem. The merge code ensures that the
PayloadProcessorProvider.ReaderPayloadProcessor
instance you return will be accessed by one
thread to obtain the PayloadProcessorProvider.ReaderPayloadProcessor
s for different terms.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PayloadProcessorProvider
public PayloadProcessorProvider()
getReaderProcessor
public abstract PayloadProcessorProvider.ReaderPayloadProcessor getReaderProcessor(AtomicReader reader)
throws IOException
- Returns a
PayloadProcessorProvider.ReaderPayloadProcessor
for the given Directory
,
through which PayloadProcessorProvider.ReaderPayloadProcessor
s can be obtained for each
Term
, or null
if none should be used.
- Throws:
IOException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.