org.apache.lucene.search
Class NRTManager.TrackingIndexWriter

java.lang.Object
  extended by 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.

Constructor Summary
NRTManager.TrackingIndexWriter(IndexWriter writer)
           
 
Method Summary
 long addDocument(Iterable<? extends IndexableField> d)
           
 long addDocument(Iterable<? extends IndexableField> d, Analyzer a)
           
 long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs)
           
 long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer a)
           
 long addIndexes(Directory... dirs)
           
 long addIndexes(IndexReader... readers)
           
 long deleteAll()
           
 long deleteDocuments(Query... queries)
           
 long deleteDocuments(Query q)
           
 long deleteDocuments(Term... terms)
           
 long deleteDocuments(Term t)
           
 long getGeneration()
           
 IndexWriter getIndexWriter()
           
 long tryDeleteDocument(IndexReader reader, int docID)
           
 long updateDocument(Term t, Iterable<? extends IndexableField> d)
           
 long updateDocument(Term t, Iterable<? extends IndexableField> d, Analyzer a)
           
 long updateDocuments(Term t, Iterable<? extends Iterable<? extends IndexableField>> docs)
           
 long updateDocuments(Term t, Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NRTManager.TrackingIndexWriter

public NRTManager.TrackingIndexWriter(IndexWriter writer)
Method Detail

updateDocument

public long updateDocument(Term t,
                           Iterable<? extends IndexableField> d,
                           Analyzer a)
                    throws IOException
Throws:
IOException

updateDocument

public long updateDocument(Term t,
                           Iterable<? extends IndexableField> d)
                    throws IOException
Throws:
IOException

updateDocuments

public long updateDocuments(Term t,
                            Iterable<? extends Iterable<? extends IndexableField>> docs,
                            Analyzer a)
                     throws IOException
Throws:
IOException

updateDocuments

public long updateDocuments(Term t,
                            Iterable<? extends Iterable<? extends IndexableField>> 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(Iterable<? extends IndexableField> d,
                        Analyzer a)
                 throws IOException
Throws:
IOException

addDocuments

public long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs,
                         Analyzer a)
                  throws IOException
Throws:
IOException

addDocument

public long addDocument(Iterable<? extends IndexableField> d)
                 throws IOException
Throws:
IOException

addDocuments

public long addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs)
                  throws IOException
Throws:
IOException

addIndexes

public long addIndexes(Directory... dirs)
                throws IOException
Throws:
IOException

addIndexes

public long addIndexes(IndexReader... readers)
                throws IOException
Throws:
IOException

getGeneration

public long getGeneration()

getIndexWriter

public IndexWriter getIndexWriter()

tryDeleteDocument

public long tryDeleteDocument(IndexReader reader,
                              int docID)
                       throws IOException
Throws:
IOException


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.