org.apache.lucene.search
Class NRTManager.TrackingIndexWriter
java.lang.Object
org.apache.lucene.search.NRTManager.TrackingIndexWriter
- Enclosing class:
- NRTManager
public static class NRTManager.TrackingIndexWriter
- extends Object
Class that tracks changes to a delegated
IndexWriter. Create this class (passing your
IndexWriter), and then pass this class to NRTManager.
Be sure to make all changes via the
TrackingIndexWriter, otherwise NRTManager won't know
about the changes.
- 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 |
NRTManager.TrackingIndexWriter
public NRTManager.TrackingIndexWriter(IndexWriter writer)
updateDocument
public long updateDocument(Term t,
Document d,
Analyzer a)
throws IOException
- Throws:
IOException
updateDocument
public long updateDocument(Term t,
Document d)
throws IOException
- Throws:
IOException
updateDocuments
public long updateDocuments(Term t,
Collection<Document> docs,
Analyzer a)
throws IOException
- Throws:
IOException
updateDocuments
public long updateDocuments(Term t,
Collection<Document> docs)
throws IOException
- Throws:
IOException
deleteDocuments
public long deleteDocuments(Term t)
throws IOException
- Throws:
IOException
deleteDocuments
public long deleteDocuments(Term... terms)
throws IOException
- Throws:
IOException
deleteDocuments
public long deleteDocuments(Query q)
throws IOException
- Throws:
IOException
deleteDocuments
public long deleteDocuments(Query... queries)
throws IOException
- Throws:
IOException
deleteAll
public long deleteAll()
throws IOException
- Throws:
IOException
addDocument
public long addDocument(Document d,
Analyzer a)
throws IOException
- Throws:
IOException
addDocuments
public long addDocuments(Collection<Document> docs,
Analyzer a)
throws IOException
- Throws:
IOException
addDocument
public long addDocument(Document d)
throws IOException
- Throws:
IOException
addDocuments
public long addDocuments(Collection<Document> docs)
throws IOException
- Throws:
IOException
addIndexes
public long addIndexes(Directory... dirs)
throws CorruptIndexException,
IOException
- Throws:
CorruptIndexException
IOException
addIndexes
public long addIndexes(IndexReader... readers)
throws CorruptIndexException,
IOException
- Throws:
CorruptIndexException
IOException
getGeneration
public long getGeneration()
getIndexWriter
public IndexWriter getIndexWriter()