com.liferay.portal.lucene
Class ReadOnlyIndexWriter

java.lang.Object
  extended by org.apache.lucene.index.IndexWriter
      extended by com.liferay.portal.lucene.ReadOnlyIndexWriter

public class ReadOnlyIndexWriter
extends org.apache.lucene.index.IndexWriter

View Source

Author:
Jorge Ferrer

Field Summary
 
Fields inherited from class org.apache.lucene.index.IndexWriter
DEFAULT_MAX_BUFFERED_DELETE_TERMS, DEFAULT_MAX_BUFFERED_DOCS, DEFAULT_MAX_FIELD_LENGTH, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_TERM_INDEX_INTERVAL, WRITE_LOCK_NAME, WRITE_LOCK_TIMEOUT
 
Constructor Summary
ReadOnlyIndexWriter(org.apache.lucene.store.Directory luceneDir, org.apache.lucene.analysis.Analyzer analyzer, boolean create)
           
 
Method Summary
 void addDocument(org.apache.lucene.document.Document document)
           
 void addDocument(org.apache.lucene.document.Document document, org.apache.lucene.analysis.Analyzer analyzer)
           
 void addIndexes(org.apache.lucene.store.Directory[] directories)
           
 void addIndexes(org.apache.lucene.index.IndexReader[] indexReaders)
           
 void addIndexesNoOptimize(org.apache.lucene.store.Directory[] directories)
           
 void deleteDocuments(org.apache.lucene.index.Term term)
           
 void deleteDocuments(org.apache.lucene.index.Term[] terms)
           
 void optimize()
           
 void updateDocument(org.apache.lucene.index.Term term, org.apache.lucene.document.Document document)
           
 void updateDocument(org.apache.lucene.index.Term term, org.apache.lucene.document.Document document, org.apache.lucene.analysis.Analyzer analyzer)
           
 
Methods inherited from class org.apache.lucene.index.IndexWriter
abort, close, docCount, ensureOpen, finalize, flush, flushRamSegments, getAnalyzer, getDefaultInfoStream, getDefaultWriteLockTimeout, getDirectory, getInfoStream, getMaxBufferedDeleteTerms, getMaxBufferedDocs, getMaxFieldLength, getMaxMergeDocs, getMergeFactor, getSimilarity, getTermIndexInterval, getUseCompoundFile, getWriteLockTimeout, maybeFlushRamSegments, numRamDocs, ramSizeInBytes, setDefaultInfoStream, setDefaultWriteLockTimeout, setInfoStream, setMaxBufferedDeleteTerms, setMaxBufferedDocs, setMaxFieldLength, setMaxMergeDocs, setMergeFactor, setSimilarity, setTermIndexInterval, setUseCompoundFile, setWriteLockTimeout
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyIndexWriter

public ReadOnlyIndexWriter(org.apache.lucene.store.Directory luceneDir,
                           org.apache.lucene.analysis.Analyzer analyzer,
                           boolean create)
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

addDocument

public void addDocument(org.apache.lucene.document.Document document)
                 throws org.apache.lucene.index.CorruptIndexException,
                        java.io.IOException
Overrides:
addDocument in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

addDocument

public void addDocument(org.apache.lucene.document.Document document,
                        org.apache.lucene.analysis.Analyzer analyzer)
                 throws org.apache.lucene.index.CorruptIndexException,
                        java.io.IOException
Overrides:
addDocument in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

addIndexes

public void addIndexes(org.apache.lucene.store.Directory[] directories)
                throws org.apache.lucene.index.CorruptIndexException,
                       java.io.IOException
Overrides:
addIndexes in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

addIndexes

public void addIndexes(org.apache.lucene.index.IndexReader[] indexReaders)
                throws org.apache.lucene.index.CorruptIndexException,
                       java.io.IOException
Overrides:
addIndexes in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

addIndexesNoOptimize

public void addIndexesNoOptimize(org.apache.lucene.store.Directory[] directories)
                          throws org.apache.lucene.index.CorruptIndexException,
                                 java.io.IOException
Overrides:
addIndexesNoOptimize in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

deleteDocuments

public void deleteDocuments(org.apache.lucene.index.Term term)
                     throws org.apache.lucene.index.CorruptIndexException,
                            java.io.IOException
Overrides:
deleteDocuments in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

deleteDocuments

public void deleteDocuments(org.apache.lucene.index.Term[] terms)
                     throws org.apache.lucene.index.CorruptIndexException,
                            java.io.IOException
Overrides:
deleteDocuments in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

updateDocument

public void updateDocument(org.apache.lucene.index.Term term,
                           org.apache.lucene.document.Document document)
                    throws org.apache.lucene.index.CorruptIndexException,
                           java.io.IOException
Overrides:
updateDocument in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

updateDocument

public void updateDocument(org.apache.lucene.index.Term term,
                           org.apache.lucene.document.Document document,
                           org.apache.lucene.analysis.Analyzer analyzer)
                    throws org.apache.lucene.index.CorruptIndexException,
                           java.io.IOException
Overrides:
updateDocument in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException

optimize

public void optimize()
              throws org.apache.lucene.index.CorruptIndexException,
                     java.io.IOException
Overrides:
optimize in class org.apache.lucene.index.IndexWriter
Throws:
org.apache.lucene.index.CorruptIndexException
java.io.IOException