Class DefaultIndexUpdater

  • All Implemented Interfaces:
    IndexUpdater

    @Singleton
    @Named
    public class DefaultIndexUpdater
    extends java.lang.Object
    implements IndexUpdater
    A default index updater implementation
    Author:
    Jason van Zyl, Eugene Kuleshov
    • Method Detail

      • getLogger

        protected org.slf4j.Logger getLogger()
      • getTimestamp

        public java.util.Date getTimestamp​(java.util.Properties properties,
                                           java.lang.String key)
      • unpackIndexData

        public static IndexDataReader.IndexDataReadResult unpackIndexData​(java.io.InputStream is,
                                                                          org.apache.lucene.store.Directory d,
                                                                          IndexingContext context)
                                                                   throws java.io.IOException
        Unpack index data using specified Lucene Index writer
        Parameters:
        is - an input stream to unpack index data from
        w - a writer to save index data
        ics - a collection of index creators for updating unpacked documents.
        Throws:
        java.io.IOException
      • cleanCacheDirectory

        protected void cleanCacheDirectory​(java.io.File dir)
                                    throws java.io.IOException
        Cleans specified cache directory. If present, Locker.LOCK_FILE will not be deleted.
        Throws:
        java.io.IOException