|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.index.TrackingIndexWriter
public class TrackingIndexWriter
Class that tracks changes to a delegated
IndexWriter, used by ControlledRealTimeReopenThread
to ensure specific
changes are visible. Create this class (passing your
IndexWriter), and then pass this class to ControlledRealTimeReopenThread
.
Be sure to make all changes via the
TrackingIndexWriter, otherwise ControlledRealTimeReopenThread
won't know about the changes.
Constructor Summary | |
---|---|
TrackingIndexWriter(IndexWriter writer)
Create a TrackingIndexWriter wrapping the
provided IndexWriter . |
Method Summary | |
---|---|
long |
addDocument(Iterable<? extends IndexableField> d)
Calls IndexWriter.addDocument(Iterable)
and returns the generation that reflects this change. |
long |
addDocument(Iterable<? extends IndexableField> d,
Analyzer a)
Calls IndexWriter.addDocument(Iterable,Analyzer) and
returns the generation that reflects this change. |
long |
addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs)
Calls IndexWriter.addDocuments(Iterable) and
returns the generation that reflects this change. |
long |
addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs,
Analyzer a)
Calls IndexWriter.addDocuments(Iterable,Analyzer) and
returns the generation that reflects this change. |
long |
addIndexes(Directory... dirs)
Calls IndexWriter.addIndexes(Directory...) and
returns the generation that reflects this change. |
long |
addIndexes(IndexReader... readers)
Calls IndexWriter.addIndexes(IndexReader...)
and returns the generation that reflects this change. |
long |
deleteAll()
Calls IndexWriter.deleteAll() and returns the
generation that reflects this change. |
long |
deleteDocuments(Query... queries)
Calls IndexWriter.deleteDocuments(Query...)
and returns the generation that reflects this change. |
long |
deleteDocuments(Query q)
Calls IndexWriter.deleteDocuments(Query) and
returns the generation that reflects this change. |
long |
deleteDocuments(Term... terms)
Calls IndexWriter.deleteDocuments(Term...) and
returns the generation that reflects this change. |
long |
deleteDocuments(Term t)
Calls IndexWriter.deleteDocuments(Term) and
returns the generation that reflects this change. |
long |
getAndIncrementGeneration()
Return and increment current gen. |
long |
getGeneration()
Return the current generation being indexed. |
IndexWriter |
getIndexWriter()
Return the wrapped IndexWriter . |
long |
tryDeleteDocument(IndexReader reader,
int docID)
Cals IndexWriter.tryDeleteDocument(IndexReader,int) and
returns the generation that reflects this change. |
long |
updateDocument(Term t,
Iterable<? extends IndexableField> d)
Calls IndexWriter.updateDocument(Term,Iterable) and
returns the generation that reflects this change. |
long |
updateDocument(Term t,
Iterable<? extends IndexableField> d,
Analyzer a)
Calls IndexWriter.updateDocument(Term,Iterable,Analyzer)
and returns the generation that reflects this change. |
long |
updateDocuments(Term t,
Iterable<? extends Iterable<? extends IndexableField>> docs)
Calls IndexWriter.updateDocuments(Term,Iterable) and returns
the generation that reflects this change. |
long |
updateDocuments(Term t,
Iterable<? extends Iterable<? extends IndexableField>> docs,
Analyzer a)
Calls IndexWriter.updateDocuments(Term,Iterable,Analyzer)
and returns the generation that reflects this change. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrackingIndexWriter(IndexWriter writer)
TrackingIndexWriter
wrapping the
provided IndexWriter
.
Method Detail |
---|
public long updateDocument(Term t, Iterable<? extends IndexableField> d, Analyzer a) throws IOException
IndexWriter.updateDocument(Term,Iterable,Analyzer)
and returns the generation that reflects this change.
IOException
public long updateDocument(Term t, Iterable<? extends IndexableField> d) throws IOException
IndexWriter.updateDocument(Term,Iterable)
and
returns the generation that reflects this change.
IOException
public long updateDocuments(Term t, Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer a) throws IOException
IndexWriter.updateDocuments(Term,Iterable,Analyzer)
and returns the generation that reflects this change.
IOException
public long updateDocuments(Term t, Iterable<? extends Iterable<? extends IndexableField>> docs) throws IOException
IndexWriter.updateDocuments(Term,Iterable)
and returns
the generation that reflects this change.
IOException
public long deleteDocuments(Term t) throws IOException
IndexWriter.deleteDocuments(Term)
and
returns the generation that reflects this change.
IOException
public long deleteDocuments(Term... terms) throws IOException
IndexWriter.deleteDocuments(Term...)
and
returns the generation that reflects this change.
IOException
public long deleteDocuments(Query q) throws IOException
IndexWriter.deleteDocuments(Query)
and
returns the generation that reflects this change.
IOException
public long deleteDocuments(Query... queries) throws IOException
IndexWriter.deleteDocuments(Query...)
and returns the generation that reflects this change.
IOException
public long deleteAll() throws IOException
IndexWriter.deleteAll()
and returns the
generation that reflects this change.
IOException
public long addDocument(Iterable<? extends IndexableField> d, Analyzer a) throws IOException
IndexWriter.addDocument(Iterable,Analyzer)
and
returns the generation that reflects this change.
IOException
public long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer a) throws IOException
IndexWriter.addDocuments(Iterable,Analyzer)
and
returns the generation that reflects this change.
IOException
public long addDocument(Iterable<? extends IndexableField> d) throws IOException
IndexWriter.addDocument(Iterable)
and returns the generation that reflects this change.
IOException
public long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs) throws IOException
IndexWriter.addDocuments(Iterable)
and
returns the generation that reflects this change.
IOException
public long addIndexes(Directory... dirs) throws IOException
IndexWriter.addIndexes(Directory...)
and
returns the generation that reflects this change.
IOException
public long addIndexes(IndexReader... readers) throws IOException
IndexWriter.addIndexes(IndexReader...)
and returns the generation that reflects this change.
IOException
public long getGeneration()
public IndexWriter getIndexWriter()
IndexWriter
.
public long getAndIncrementGeneration()
public long tryDeleteDocument(IndexReader reader, int docID) throws IOException
IndexWriter.tryDeleteDocument(IndexReader,int)
and
returns the generation that reflects this change.
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |