org.apache.solr.update
Class SolrIndexWriter

java.lang.Object
  extended by org.apache.lucene.index.IndexWriter
      extended by org.apache.solr.update.SolrIndexWriter
All Implemented Interfaces:
Closeable, TwoPhaseCommit

public class SolrIndexWriter
extends IndexWriter

An IndexWriter that is configured via Solr config mechanisms.

Since:
solr 0.9

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexWriter
IndexWriter.IndexReaderWarmer
 
Field Summary
static String COMMIT_TIME_MSEC_KEY
          Stored into each Lucene commit to record the System.currentTimeMillis() when commit was called.
static AtomicLong numCloses
           
static AtomicLong numOpens
           
 
Fields inherited from class org.apache.lucene.index.IndexWriter
MAX_TERM_LENGTH, SOURCE, SOURCE_ADDINDEXES_READERS, SOURCE_FLUSH, SOURCE_MERGE, WRITE_LOCK_NAME
 
Method Summary
 void close()
           
static SolrIndexWriter create(String name, String path, DirectoryFactory directoryFactory, boolean create, IndexSchema schema, SolrIndexConfig config, IndexDeletionPolicy delPolicy, Codec codec)
           
protected  void finalize()
           
 void rollback()
           
 
Methods inherited from class org.apache.lucene.index.IndexWriter
addDocument, addDocument, addDocuments, addDocuments, addIndexes, addIndexes, close, commit, deleteAll, deleteDocuments, deleteDocuments, deleteDocuments, deleteDocuments, deleteUnusedFiles, doAfterFlush, doBeforeFlush, ensureOpen, ensureOpen, flush, forceMerge, forceMerge, forceMergeDeletes, forceMergeDeletes, getAnalyzer, getCommitData, getConfig, getDirectory, getMergingSegments, getNextMerge, hasDeletions, hasPendingMerges, hasUncommittedChanges, isLocked, maxDoc, maybeMerge, merge, numDeletedDocs, numDocs, numRamDocs, prepareCommit, ramSizeInBytes, segString, segString, segString, setCommitData, tryDeleteDocument, unlock, updateDocument, updateDocument, updateDocuments, updateDocuments, waitForMerges
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numOpens

public static final AtomicLong numOpens

numCloses

public static final AtomicLong numCloses

COMMIT_TIME_MSEC_KEY

public static final String COMMIT_TIME_MSEC_KEY
Stored into each Lucene commit to record the System.currentTimeMillis() when commit was called.

See Also:
Constant Field Values
Method Detail

create

public static SolrIndexWriter create(String name,
                                     String path,
                                     DirectoryFactory directoryFactory,
                                     boolean create,
                                     IndexSchema schema,
                                     SolrIndexConfig config,
                                     IndexDeletionPolicy delPolicy,
                                     Codec codec)
                              throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class IndexWriter
Throws:
IOException

rollback

public void rollback()
              throws IOException
Specified by:
rollback in interface TwoPhaseCommit
Overrides:
rollback in class IndexWriter
Throws:
IOException

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


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